Skip to content

Commit 782f091

Browse files
authored
Merge pull request #77 from os-cillation/master
Correctly typed values for "empty()" values [0 | "" | false | null | ...]
2 parents f71230f + 5e55631 commit 782f091

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+162
-109
lines changed

Tests/Annotations/DeleteTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
*
2929
* @coversDefaultClass Circle\DoctrineRestDriver\Annotations\Delete
3030
*/
31-
class DeleteTest extends \PHPUnit_Framework_TestCase {
31+
class DeleteTest extends \PHPUnit\Framework\TestCase {
3232

3333
/**
3434
* @test
@@ -52,4 +52,4 @@ public function getRoute() {
5252
$this->assertSame('DELETE', $delete->getMethod());
5353
$this->assertEquals([], $delete->getOptions());
5454
}
55-
}
55+
}

Tests/Annotations/FetchTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
*
2929
* @coversDefaultClass Circle\DoctrineRestDriver\Annotations\Fetch
3030
*/
31-
class FetchTest extends \PHPUnit_Framework_TestCase {
31+
class FetchTest extends \PHPUnit\Framework\TestCase {
3232

3333
/**
3434
* @test
@@ -43,4 +43,4 @@ public function getRoute() {
4343

4444
$this->assertSame('http://www.mySite.com/getAll', $getAll->getRoute());
4545
}
46-
}
46+
}

Tests/Annotations/InsertTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
*
2929
* @coversDefaultClass Circle\DoctrineRestDriver\Annotations\Insert
3030
*/
31-
class InsertTest extends \PHPUnit_Framework_TestCase {
31+
class InsertTest extends \PHPUnit\Framework\TestCase {
3232

3333
/**
3434
* @test
@@ -43,4 +43,4 @@ public function getRoute() {
4343

4444
$this->assertSame('http://www.mySite.com/post', $post->getRoute());
4545
}
46-
}
46+
}

Tests/Annotations/ReaderTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
*
3131
* @coversDefaultClass Circle\DoctrineRestDriver\Annotations\Reader
3232
*/
33-
class ReaderTest extends \PHPUnit_Framework_TestCase {
33+
class ReaderTest extends \PHPUnit\Framework\TestCase {
3434

3535
/**
3636
* {@inheritdoc}
@@ -67,4 +67,4 @@ public function getRoute() {
6767

6868
$this->assertEquals($expected, $reader->read($class, 'Circle\DoctrineRestDriver\Annotations\Select'));
6969
}
70-
}
70+
}

Tests/Annotations/RoutingTableTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
*
3131
* @coversDefaultClass Circle\DoctrineRestDriver\Annotations\RoutingTable
3232
*/
33-
class RoutingTableTest extends \PHPUnit_Framework_TestCase {
33+
class RoutingTableTest extends \PHPUnit\Framework\TestCase {
3434

3535
/**
3636
* {@inheritdoc}
@@ -71,4 +71,4 @@ public function get() {
7171

7272
$this->assertEquals($expected, $routingTable->get('categories'));
7373
}
74-
}
74+
}

Tests/Annotations/RoutingTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
*
3434
* @coversDefaultClass Circle\DoctrineRestDriver\Annotations\Routing
3535
*/
36-
class RoutingTest extends \PHPUnit_Framework_TestCase {
36+
class RoutingTest extends \PHPUnit\Framework\TestCase {
3737

3838
/**
3939
* {@inheritdoc}
@@ -101,4 +101,4 @@ public function delete() {
101101
public function getAll() {
102102
$this->assertSame(null, $this->routing->getAll());
103103
}
104-
}
104+
}

Tests/Annotations/SelectTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
*
2929
* @coversDefaultClass Circle\DoctrineRestDriver\Annotations\Select
3030
*/
31-
class SelectTest extends \PHPUnit_Framework_TestCase {
31+
class SelectTest extends \PHPUnit\Framework\TestCase {
3232

3333
/**
3434
* @test
@@ -43,4 +43,4 @@ public function getRoute() {
4343

4444
$this->assertSame('http://www.mySite.com/get', $get->getRoute());
4545
}
46-
}
46+
}

Tests/Annotations/UpdateTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
*
2929
* @coversDefaultClass Circle\DoctrineRestDriver\Annotations\Update
3030
*/
31-
class UpdateTest extends \PHPUnit_Framework_TestCase {
31+
class UpdateTest extends \PHPUnit\Framework\TestCase {
3232

3333
/**
3434
* @test
@@ -43,4 +43,4 @@ public function getRoute() {
4343

4444
$this->assertSame('http://www.mySite.com/put', $put->getRoute());
4545
}
46-
}
46+
}

Tests/DriverTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
*
2929
* @coversDefaultClass Circle\DoctrineRestDriver\Driver
3030
*/
31-
class DriverTest extends \PHPUnit_Framework_TestCase {
31+
class DriverTest extends \PHPUnit\Framework\TestCase {
3232

3333
/**
3434
* @var Driver
@@ -99,4 +99,4 @@ public function connect() {
9999
$connection = $this->driver->connect($params, null, null, $params['driverOptions']);
100100
$this->assertInstanceOf('Circle\DoctrineRestDriver\Connection', $connection);
101101
}
102-
}
102+
}

Tests/Enum/HttpMethodsTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
*
3030
* @coversDefaultClass Circle\DoctrineRestDriver\Enums\HttpMethods
3131
*/
32-
class HttpMethodsTest extends \PHPUnit_Framework_TestCase {
32+
class HttpMethodsTest extends \PHPUnit\Framework\TestCase {
3333

3434
/**
3535
* @test
@@ -48,4 +48,4 @@ public function ofSqlOperation() {
4848

4949
HttpMethods::ofSqlOperation('invalid');
5050
}
51-
}
51+
}

Tests/Exceptions/ExceptionsTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
*
3232
* @SuppressWarnings("PHPMD.StaticAccess")
3333
*/
34-
class ExceptionsTest extends \PHPUnit_Framework_TestCase {
34+
class ExceptionsTest extends \PHPUnit\Framework\TestCase {
3535

3636
/**
3737
* @test
@@ -130,4 +130,4 @@ public function invalidSqlOperationExceptionTest() {
130130
public function invalidFormatExceptionTest() {
131131
Exceptions::invalidFormatException('class');
132132
}
133-
}
133+
}

Tests/Factory/RequestFactoryTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
*
3131
* @coversDefaultClass Circle\DoctrineRestDriver\Factory\RequestFactory
3232
*/
33-
class RequestFactoryTest extends \PHPUnit_Framework_TestCase {
33+
class RequestFactoryTest extends \PHPUnit\Framework\TestCase {
3434

3535
/**
3636
* @var array
@@ -125,4 +125,4 @@ public function createWithPaginationParameters() {
125125

126126
$this->assertEquals($expected, $factory->createOne('get', $parser->parse($query), $this->factoryOptions, $routings));
127127
}
128-
}
128+
}

Tests/Factory/RestClientFactoryTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
*
2929
* @coversDefaultClass Circle\DoctrineRestDriver\Factory\RestClientFactory
3030
*/
31-
class RestClientFactoryTest extends \PHPUnit_Framework_TestCase {
31+
class RestClientFactoryTest extends \PHPUnit\Framework\TestCase {
3232

3333
/**
3434
* @test
@@ -39,4 +39,4 @@ public function createOne() {
3939
$factory = new RestClientFactory();
4040
$this->assertInstanceOf('Circle\RestClientBundle\Services\RestClient', $factory->createOne([]));
4141
}
42-
}
42+
}

Tests/Formatters/JsonTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
*
2929
* @coversDefaultClass Circle\DoctrineRestDriver\Formatters\Json
3030
*/
31-
class JsonTest extends \PHPUnit_Framework_TestCase {
31+
class JsonTest extends \PHPUnit\Framework\TestCase {
3232

3333
/**
3434
* @test
@@ -53,4 +53,4 @@ public function decode() {
5353
$json = new Json();
5454
$this->assertEquals(['test' => 'test'], $json->decode('{"test": "test"}'));
5555
}
56-
}
56+
}

Tests/RestClientTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
*
3232
* @coversDefaultClass Circle\DoctrineRestDriver\RestClient
3333
*/
34-
class RestClientTest extends \PHPUnit_Framework_TestCase {
34+
class RestClientTest extends \PHPUnit\Framework\TestCase {
3535

3636
/**
3737
* @var RestClient
@@ -66,4 +66,4 @@ public function send() {
6666

6767
$this->assertEquals($response->getContent(), $this->restClient->send($request)->getContent());
6868
}
69-
}
69+
}

Tests/Security/HttpAuthenticationTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
*
3131
* @coversDefaultClass Circle\DoctrineRestDriver\Security\HttpAuthentication
3232
*/
33-
class HttpAuthenticationTest extends \PHPUnit_Framework_TestCase {
33+
class HttpAuthenticationTest extends \PHPUnit\Framework\TestCase {
3434

3535
/**
3636
* @var HttpAuthentication
@@ -75,4 +75,4 @@ public function transformRequest() {
7575

7676
$this->assertEquals($expected, $this->authentication->transformRequest($request));
7777
}
78-
}
78+
}

Tests/Security/NoAuthenticationTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
*
3131
* @coversDefaultClass Circle\DoctrineRestDriver\Security\NoAuthentication
3232
*/
33-
class NoAuthenticationTest extends \PHPUnit_Framework_TestCase {
33+
class NoAuthenticationTest extends \PHPUnit\Framework\TestCase {
3434

3535
/**
3636
* @var NoAuthentication
@@ -70,4 +70,4 @@ public function transformRequest() {
7070

7171
$this->assertEquals($expected, $this->authentication->transformRequest($request));
7272
}
73-
}
73+
}

Tests/StatementTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
*
2929
* @coversDefaultClass Circle\DoctrineRestDriver\Statement
3030
*/
31-
class StatementTest extends \PHPUnit_Framework_TestCase {
31+
class StatementTest extends \PHPUnit\Framework\TestCase {
3232

3333
/**
3434
* @var Statement
@@ -131,4 +131,4 @@ public function fetchAllFalseMode() {
131131
public function fetchAll() {
132132
$this->assertEquals([], $this->statement->fetchAll(\PDO::FETCH_ASSOC));
133133
}
134-
}
134+
}

Tests/Transformers/MysqlToRequestTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
* @coversDefaultClass Circle\DoctrineRestDriver\Transformers\MysqlToRequest
3333
* @SuppressWarnings("PHPMD.TooManyPublicMethods")
3434
*/
35-
class MysqlToRequestTest extends \PHPUnit_Framework_TestCase {
35+
class MysqlToRequestTest extends \PHPUnit\Framework\TestCase {
3636

3737
/**
3838
*

Tests/Types/AnnotationTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
*
3232
* @coversDefaultClass Circle\DoctrineRestDriver\Types\Annotation
3333
*/
34-
class AnnotationTest extends \PHPUnit_Framework_TestCase {
34+
class AnnotationTest extends \PHPUnit\Framework\TestCase {
3535

3636
/**
3737
* @test
@@ -62,4 +62,4 @@ public function get() {
6262

6363
$this->assertEquals($annotation, Annotation::get($routings, 'products', 'get'));
6464
}
65-
}
65+
}

Tests/Types/AuthenticationTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
*
2929
* @coversDefaultClass Circle\DoctrineRestDriver\Types\Authentication
3030
*/
31-
class AuthenticationTest extends \PHPUnit_Framework_TestCase {
31+
class AuthenticationTest extends \PHPUnit\Framework\TestCase {
3232

3333
/**
3434
* @test
@@ -63,4 +63,4 @@ public function assert() {
6363
$authStrategy = $this->getMockBuilder('Circle\DoctrineRestDriver\Security\HttpAuthentication')->disableOriginalConstructor()->getMock();
6464
$this->assertSame($authStrategy, Authentication::assert($authStrategy));
6565
}
66-
}
66+
}

Tests/Types/CurlOptionsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
*
2929
* @coversDefaultClass Circle\DoctrineRestDriver\Types\CurlOptions
3030
*/
31-
class CurlOptionsTest extends \PHPUnit_Framework_TestCase {
31+
class CurlOptionsTest extends \PHPUnit\Framework\TestCase {
3232

3333
/**
3434
* @var array

Tests/Types/FormatTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
*
2929
* @coversDefaultClass Circle\DoctrineRestDriver\Types\Format
3030
*/
31-
class FormatTest extends \PHPUnit_Framework_TestCase {
31+
class FormatTest extends \PHPUnit\Framework\TestCase {
3232

3333
/**
3434
* @test
@@ -63,4 +63,4 @@ public function assert() {
6363
$formatter = $this->getMockBuilder('Circle\DoctrineRestDriver\Formatters\Formatter')->getMock();
6464
$this->assertSame($formatter, Format::assert($formatter));
6565
}
66-
}
66+
}

Tests/Types/HashMapEntryTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
*
2929
* @coversDefaultClass Circle\DoctrineRestDriver\Types\HashMapEntry
3030
*/
31-
class HashMapEntryTest extends \PHPUnit_Framework_TestCase {
31+
class HashMapEntryTest extends \PHPUnit\Framework\TestCase {
3232

3333
/**
3434
* @test
@@ -57,4 +57,4 @@ public function assertExists() {
5757
];
5858
$this->assertSame($hashMap, HashMapEntry::assertExists($hashMap, 'test', 'test'));
5959
}
60-
}
60+
}

Tests/Types/HashMapTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
*
2929
* @coversDefaultClass Circle\DoctrineRestDriver\Types\HashMap
3030
*/
31-
class HashMapTest extends \PHPUnit_Framework_TestCase {
31+
class HashMapTest extends \PHPUnit\Framework\TestCase {
3232

3333
/**
3434
* @test
@@ -43,4 +43,4 @@ public function assert() {
4343
];
4444
$this->assertSame($hashMap, HashMap::assert($hashMap, 'test'));
4545
}
46-
}
46+
}

Tests/Types/HttpHeaderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
*
2929
* @coversDefaultClass Circle\DoctrineRestDriver\Types\HttpHeader
3030
*/
31-
class HttpHeaderTest extends \PHPUnit_Framework_TestCase {
31+
class HttpHeaderTest extends \PHPUnit\Framework\TestCase {
3232

3333
/**
3434
* @var array

0 commit comments

Comments
 (0)