Skip to content

Commit c006d4a

Browse files
carusogabrieljaapio
authored andcommitted
Use PHPUnit\Framework\TestCase instead of PHPUnit_Framework_TestCase
1 parent 03b7048 commit c006d4a

32 files changed

+77
-36
lines changed

tests/integration/DocblocksWithAnnotationsTest.php

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

1313
namespace phpDocumentor\Reflection;
1414

15+
use PHPUnit\Framework\TestCase;
16+
1517
/**
1618
* @coversNothing
1719
*/
18-
final class DocblocksWithAnnotationsTest extends \PHPUnit_Framework_TestCase
20+
final class DocblocksWithAnnotationsTest extends TestCase
1921
{
2022
public function testDocblockWithAnnotations()
2123
{

tests/integration/InterpretingDocBlocksTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,12 @@
1616
use phpDocumentor\Reflection\DocBlock\StandardTagFactory;
1717
use phpDocumentor\Reflection\DocBlock\Tag;
1818
use phpDocumentor\Reflection\DocBlock\Tags\See;
19+
use PHPUnit\Framework\TestCase;
1920

2021
/**
2122
* @coversNothing
2223
*/
23-
class InterpretingDocBlocksTest extends \PHPUnit_Framework_TestCase
24+
class InterpretingDocBlocksTest extends TestCase
2425
{
2526
public function testInterpretingASimpleDocBlock()
2627
{

tests/integration/ReconstitutingADocBlockTest.php

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

1313
namespace phpDocumentor\Reflection;
1414

15+
use phpDocumentor\Reflection\DocBlock\Description;
16+
use phpDocumentor\Reflection\DocBlock\StandardTagFactory;
17+
use phpDocumentor\Reflection\DocBlock\Tag;
18+
use phpDocumentor\Reflection\DocBlock\Tags\See;
19+
use PHPUnit\Framework\TestCase;
20+
1521
/**
1622
* @coversNothing
1723
*/
18-
class ReconstitutingADocBlockTest extends \PHPUnit_Framework_TestCase
24+
class ReconstitutingADocBlockTest extends TestCase
1925
{
2026
public function testReconstituteADocBlock()
2127
{

tests/integration/UsingTagsTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,13 @@
1414

1515
use phpDocumentor\Reflection\DocBlock\Description;
1616
use phpDocumentor\Reflection\DocBlock\Tag;
17+
use phpDocumentor\Reflection\DocBlock\Tags\See;
18+
use PHPUnit\Framework\TestCase;
1719

1820
/**
1921
* @coversNothing
2022
*/
21-
class UsingTagsTest extends \PHPUnit_Framework_TestCase
23+
class UsingTagsTest extends TestCase
2224
{
2325
public function testAddingYourOwnTagUsingAStaticMethodAsFactory()
2426
{

tests/unit/DocBlock/DescriptionFactoryTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,13 @@
1515
use Mockery as m;
1616
use phpDocumentor\Reflection\DocBlock\Tags\Link;
1717
use phpDocumentor\Reflection\Types\Context;
18+
use PHPUnit\Framework\TestCase;
1819

1920
/**
2021
* @coversDefaultClass \phpDocumentor\Reflection\DocBlock\DescriptionFactory
2122
* @covers ::<private>
2223
*/
23-
class DescriptionFactoryTest extends \PHPUnit_Framework_TestCase
24+
class DescriptionFactoryTest extends TestCase
2425
{
2526
/**
2627
* @covers ::__construct

tests/unit/DocBlock/DescriptionTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,12 @@
1515
use Mockery as m;
1616
use phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter;
1717
use phpDocumentor\Reflection\DocBlock\Tags\Generic;
18+
use PHPUnit\Framework\TestCase;
1819

1920
/**
2021
* @coversDefaultClass \phpDocumentor\Reflection\DocBlock\Description
2122
*/
22-
class DescriptionTest extends \PHPUnit_Framework_TestCase
23+
class DescriptionTest extends TestCase
2324
{
2425
/**
2526
* @covers ::__construct

tests/unit/DocBlock/ExampleFinderTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@
33
namespace phpDocumentor\Reflection\DocBlock;
44

55
use phpDocumentor\Reflection\DocBlock\Tags\Example;
6+
use PHPUnit\Framework\TestCase;
67

78
/**
89
* @coversDefaultClass phpDocumentor\Reflection\DocBlock\ExampleFinder
910
* @covers ::<private>
1011
*/
11-
class ExampleFinderTest extends \PHPUnit_Framework_TestCase
12+
class ExampleFinderTest extends TestCase
1213
{
1314
/** @var ExampleFinder */
1415
private $fixture;

tests/unit/DocBlock/SerializerTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,13 @@
1313
namespace phpDocumentor\Reflection\DocBlock;
1414

1515
use phpDocumentor\Reflection\DocBlock;
16+
use PHPUnit\Framework\TestCase;
1617

1718
/**
1819
* @coversDefaultClass \phpDocumentor\Reflection\DocBlock\Serializer
1920
* @covers ::<private>
2021
*/
21-
class SerializerTest extends \PHPUnit_Framework_TestCase
22+
class SerializerTest extends TestCase
2223
{
2324
/**
2425
* @covers ::__construct

tests/unit/DocBlock/StandardTagFactoryTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,13 @@
2323
use phpDocumentor\Reflection\FqsenResolver;
2424
use phpDocumentor\Reflection\TypeResolver;
2525
use phpDocumentor\Reflection\Types\Context;
26+
use PHPUnit\Framework\TestCase;
2627

2728
/**
2829
* @coversDefaultClass phpDocumentor\Reflection\DocBlock\StandardTagFactory
2930
* @covers ::<private>
3031
*/
31-
class StandardTagFactoryTest extends \PHPUnit_Framework_TestCase
32+
class StandardTagFactoryTest extends TestCase
3233
{
3334
/**
3435
* @covers ::__construct

tests/unit/DocBlock/Tags/AuthorTest.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,18 @@
99
* @license http://www.opensource.org/licenses/mit-license.php MIT
1010
* @link http://phpdoc.org
1111
*/
12-
1312
namespace phpDocumentor\Reflection\DocBlock\Tags;
1413

1514
use Mockery as m;
15+
use PHPUnit\Framework\TestCase;
1616

1717
/**
1818
* @coversDefaultClass \phpDocumentor\Reflection\DocBlock\Tags\Author
1919
* @covers ::<private>
2020
*/
21-
class AuthorTest extends \PHPUnit_Framework_TestCase
21+
class AuthorTest extends TestCase
2222
{
23+
2324
/**
2425
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Author::__construct
2526
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
@@ -121,7 +122,7 @@ public function testStringRepresentationIsReturned()
121122
{
122123
$fixture = new Author('Mike van Riel', '[email protected]');
123124

124-
$this->assertSame('Mike van Riel <[email protected]>', (string)$fixture);
125+
$this->assertSame('Mike van Riel <[email protected]>', (string) $fixture);
125126
}
126127

127128
/**
@@ -132,7 +133,7 @@ public function testStringRepresentationWithEmtpyEmail()
132133
{
133134
$fixture = new Author('Mike van Riel', '');
134135

135-
$this->assertSame('Mike van Riel', (string)$fixture);
136+
$this->assertSame('Mike van Riel', (string) $fixture);
136137
}
137138

138139
/**
@@ -143,7 +144,7 @@ public function testFactoryMethod()
143144
{
144145
$fixture = Author::create('Mike van Riel <[email protected]>');
145146

146-
$this->assertSame('Mike van Riel <[email protected]>', (string)$fixture);
147+
$this->assertSame('Mike van Riel <[email protected]>', (string) $fixture);
147148
$this->assertSame('Mike van Riel', $fixture->getAuthorName());
148149
$this->assertSame('[email protected]', $fixture->getEmail());
149150
}
@@ -156,4 +157,5 @@ public function testFactoryMethodReturnsNullIfItCouldNotReadBody()
156157
{
157158
$this->assertNull(Author::create('dfgr<'));
158159
}
160+
159161
}

0 commit comments

Comments
 (0)