Skip to content

Commit 9df01c8

Browse files
committed
Don't declare properties dynamically
1 parent d607daf commit 9df01c8

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

test/simple/CurlRequestTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ public function testAttributes() {
2020
}
2121

2222
public function testConstructor() {
23-
$request = new CurlRequest(['foo' => 'bar']);
24-
$this->assertEquals('bar', $request->foo);
23+
$request = new CurlRequest(['url' => 'foobar']);
24+
$this->assertEquals('foobar', $request->url);
2525
}
2626

2727
public function testGetCurlOptions() {

test/simple/CurlResponseTest.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
use transloadit\CurlResponse;
66

77
class CurlResponseTest extends \PHPUnit\Framework\TestCase {
8+
protected $response;
9+
810
public function setUp(): void {
911
$this->response = new CurlResponse();
1012
}
@@ -17,8 +19,8 @@ public function testAttributes() {
1719
}
1820

1921
public function testConstructor() {
20-
$transloadit = new CurlResponse(['foo' => 'bar']);
21-
$this->assertEquals('bar', $transloadit->foo);
22+
$transloadit = new CurlResponse(['data' => 'foobar']);
23+
$this->assertEquals('foobar', $transloadit->data);
2224
}
2325

2426
public function testParseJson() {

test/simple/TransloaditTest.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,14 @@
88
date_default_timezone_set('UTC');
99

1010
class TransloaditTest extends \PHPUnit\Framework\TestCase {
11+
protected $transloadit;
1112
public function setUp(): void {
1213
$this->transloadit = new Transloadit();
1314
}
1415

1516
public function testConstructor() {
16-
$transloadit = new Transloadit(['foo' => 'bar']);
17-
$this->assertEquals('bar', $transloadit->foo);
17+
$transloadit = new Transloadit(['endpoint' => 'foobar']);
18+
$this->assertEquals('foobar', $transloadit->endpoint);
1819
}
1920

2021
public function testAttributes() {
@@ -77,11 +78,11 @@ public function testCancelAssembly() {
7778
public function testRequest() {
7879
$this->transloadit->key = 'my-key';
7980
$this->transloadit->secret = 'my-secret';
80-
$request = $this->transloadit->request(['foo' => 'bar'], false);
81+
$request = $this->transloadit->request(['url' => 'foobar'], false);
8182

8283
$this->assertEquals($this->transloadit->key, $request->key);
8384
$this->assertEquals($this->transloadit->secret, $request->secret);
84-
$this->assertEquals('bar', $request->foo);
85+
$this->assertEquals('foobar', $request->url);
8586

8687
// Unfortunately we can't test the $execute parameter because PHP
8788
// is a little annoying. But that's ok for now.

0 commit comments

Comments
 (0)