Skip to content

Commit 81b006f

Browse files
carusogabrieljaapio
authored andcommitted
Use PHPUnit\Framework\TestCase instead of PHPUnit_Framework_TestCase
1 parent e555aca commit 81b006f

File tree

7 files changed

+20
-9
lines changed

7 files changed

+20
-9
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"psr-4": {"phpDocumentor\\Reflection\\": ["tests/unit"]}
1717
},
1818
"require-dev": {
19-
"phpunit/phpunit": "^5.2||^4.8.24",
19+
"phpunit/phpunit": "^5.7 ||^4.8.35",
2020
"mockery/mockery": "^0.9.4"
2121
},
2222
"extra": {

tests/unit/CollectionResolverTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,13 @@
1717
use phpDocumentor\Reflection\Types\Compound;
1818
use phpDocumentor\Reflection\Types\Context;
1919
use phpDocumentor\Reflection\Types\Object_;
20+
use PHPUnit\Framework\TestCase;
2021

2122
/**
2223
* @covers ::<private>
2324
* @coversDefaultClass phpDocumentor\Reflection\TypeResolver
2425
*/
25-
class CollectionResolverTest extends \PHPUnit_Framework_TestCase
26+
class CollectionResolverTest extends TestCase
2627
{
2728
/**
2829
*

tests/unit/TypeResolverTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,12 @@
2222
use phpDocumentor\Reflection\Types\Boolean;
2323
use Mockery\MockInterface;
2424
use phpDocumentor\Reflection\Types\String_;
25+
use PHPUnit\Framework\TestCase;
2526

2627
/**
2728
* @coversDefaultClass phpDocumentor\Reflection\TypeResolver
2829
*/
29-
class TypeResolverTest extends \PHPUnit_Framework_TestCase
30+
class TypeResolverTest extends TestCase
3031
{
3132
/**
3233
* @param string $keyword

tests/unit/Types/CompoundTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,12 @@
1212

1313
namespace phpDocumentor\Reflection\Types;
1414

15+
use PHPUnit\Framework\TestCase;
16+
1517
/**
1618
* @coversDefaultClass \phpDocumentor\Reflection\Types\Compound
1719
*/
18-
class CompoundTest extends \PHPUnit_Framework_TestCase
20+
class CompoundTest extends TestCase
1921
{
2022
/**
2123
* @covers ::__construct

tests/unit/Types/ContextFactoryTest.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,13 @@
1818
phpDocumentor\Reflection\DocBlock\Tag;
1919
use phpDocumentor;
2020
use \ReflectionClass; // yes, the slash is part of the test
21+
use PHPUnit\Framework\TestCase;
2122

2223
/**
2324
* @coversDefaultClass \phpDocumentor\Reflection\Types\ContextFactory
2425
* @covers ::<private>
2526
*/
26-
class ContextFactoryTest extends \PHPUnit_Framework_TestCase
27+
class ContextFactoryTest extends TestCase
2728
{
2829
/**
2930
* @covers ::createFromReflector
@@ -51,7 +52,8 @@ public function testReadsAliasesFromClassReflection()
5152
'DocBlock' => DocBlock::class,
5253
'Tag' => Tag::class,
5354
'phpDocumentor' => 'phpDocumentor',
54-
ReflectionClass::class => ReflectionClass::class
55+
ReflectionClass::class => ReflectionClass::class,
56+
'TestCase' => TestCase::class
5557
];
5658
$context = $fixture->createFromReflector(new ReflectionClass($this));
5759

@@ -82,7 +84,8 @@ public function testReadsAliasesFromProvidedNamespaceAndContent()
8284
'DocBlock' => DocBlock::class,
8385
'Tag' => Tag::class,
8486
'phpDocumentor' => 'phpDocumentor',
85-
ReflectionClass::class => ReflectionClass::class
87+
ReflectionClass::class => ReflectionClass::class,
88+
'TestCase' => TestCase::class,
8689
];
8790
$context = $fixture->createForNamespace(__NAMESPACE__, file_get_contents(__FILE__));
8891

tests/unit/Types/ContextTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,12 @@
1212

1313
namespace phpDocumentor\Reflection\Types;
1414

15+
use PHPUnit\Framework\TestCase;
16+
1517
/**
1618
* @coversDefaultClass \phpDocumentor\Reflection\Types\Context
1719
*/
18-
class ContextTest extends \PHPUnit_Framework_TestCase
20+
class ContextTest extends TestCase
1921
{
2022
/**
2123
* @covers ::__construct

tests/unit/Types/NullableTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,12 @@
1212

1313
namespace phpDocumentor\Reflection\Types;
1414

15+
use PHPUnit\Framework\TestCase;
16+
1517
/**
1618
* @coversDefaultClass \phpDocumentor\Reflection\Types\Nullable
1719
*/
18-
class NullableTest extends \PHPUnit_Framework_TestCase
20+
class NullableTest extends TestCase
1921
{
2022
/**
2123
* @covers ::__construct

0 commit comments

Comments
 (0)