Use PHPUnit\Framework\TestCase instead of PHPUnit_Framework_TestCase

This commit is contained in:
Gabriel Caruso
2017-11-15 08:29:42 +01:00
committed by Jaap van Otterdijk
parent 03b7048a61
commit c006d4a2d5
32 changed files with 77 additions and 36 deletions
@@ -12,10 +12,12 @@
namespace phpDocumentor\Reflection;
use PHPUnit\Framework\TestCase;
/**
* @coversNothing
*/
final class DocblocksWithAnnotationsTest extends \PHPUnit_Framework_TestCase
final class DocblocksWithAnnotationsTest extends TestCase
{
public function testDocblockWithAnnotations()
{
@@ -16,11 +16,12 @@ use phpDocumentor\Reflection\DocBlock\Description;
use phpDocumentor\Reflection\DocBlock\StandardTagFactory;
use phpDocumentor\Reflection\DocBlock\Tag;
use phpDocumentor\Reflection\DocBlock\Tags\See;
use PHPUnit\Framework\TestCase;
/**
* @coversNothing
*/
class InterpretingDocBlocksTest extends \PHPUnit_Framework_TestCase
class InterpretingDocBlocksTest extends TestCase
{
public function testInterpretingASimpleDocBlock()
{
@@ -12,10 +12,16 @@
namespace phpDocumentor\Reflection;
use phpDocumentor\Reflection\DocBlock\Description;
use phpDocumentor\Reflection\DocBlock\StandardTagFactory;
use phpDocumentor\Reflection\DocBlock\Tag;
use phpDocumentor\Reflection\DocBlock\Tags\See;
use PHPUnit\Framework\TestCase;
/**
* @coversNothing
*/
class ReconstitutingADocBlockTest extends \PHPUnit_Framework_TestCase
class ReconstitutingADocBlockTest extends TestCase
{
public function testReconstituteADocBlock()
{
+3 -1
View File
@@ -14,11 +14,13 @@ namespace phpDocumentor\Reflection;
use phpDocumentor\Reflection\DocBlock\Description;
use phpDocumentor\Reflection\DocBlock\Tag;
use phpDocumentor\Reflection\DocBlock\Tags\See;
use PHPUnit\Framework\TestCase;
/**
* @coversNothing
*/
class UsingTagsTest extends \PHPUnit_Framework_TestCase
class UsingTagsTest extends TestCase
{
public function testAddingYourOwnTagUsingAStaticMethodAsFactory()
{
@@ -15,12 +15,13 @@ namespace phpDocumentor\Reflection\DocBlock;
use Mockery as m;
use phpDocumentor\Reflection\DocBlock\Tags\Link;
use phpDocumentor\Reflection\Types\Context;
use PHPUnit\Framework\TestCase;
/**
* @coversDefaultClass \phpDocumentor\Reflection\DocBlock\DescriptionFactory
* @covers ::<private>
*/
class DescriptionFactoryTest extends \PHPUnit_Framework_TestCase
class DescriptionFactoryTest extends TestCase
{
/**
* @covers ::__construct
+2 -1
View File
@@ -15,11 +15,12 @@ namespace phpDocumentor\Reflection\DocBlock;
use Mockery as m;
use phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter;
use phpDocumentor\Reflection\DocBlock\Tags\Generic;
use PHPUnit\Framework\TestCase;
/**
* @coversDefaultClass \phpDocumentor\Reflection\DocBlock\Description
*/
class DescriptionTest extends \PHPUnit_Framework_TestCase
class DescriptionTest extends TestCase
{
/**
* @covers ::__construct
+2 -1
View File
@@ -3,12 +3,13 @@
namespace phpDocumentor\Reflection\DocBlock;
use phpDocumentor\Reflection\DocBlock\Tags\Example;
use PHPUnit\Framework\TestCase;
/**
* @coversDefaultClass phpDocumentor\Reflection\DocBlock\ExampleFinder
* @covers ::<private>
*/
class ExampleFinderTest extends \PHPUnit_Framework_TestCase
class ExampleFinderTest extends TestCase
{
/** @var ExampleFinder */
private $fixture;
+2 -1
View File
@@ -13,12 +13,13 @@
namespace phpDocumentor\Reflection\DocBlock;
use phpDocumentor\Reflection\DocBlock;
use PHPUnit\Framework\TestCase;
/**
* @coversDefaultClass \phpDocumentor\Reflection\DocBlock\Serializer
* @covers ::<private>
*/
class SerializerTest extends \PHPUnit_Framework_TestCase
class SerializerTest extends TestCase
{
/**
* @covers ::__construct
@@ -23,12 +23,13 @@ use phpDocumentor\Reflection\Fqsen;
use phpDocumentor\Reflection\FqsenResolver;
use phpDocumentor\Reflection\TypeResolver;
use phpDocumentor\Reflection\Types\Context;
use PHPUnit\Framework\TestCase;
/**
* @coversDefaultClass phpDocumentor\Reflection\DocBlock\StandardTagFactory
* @covers ::<private>
*/
class StandardTagFactoryTest extends \PHPUnit_Framework_TestCase
class StandardTagFactoryTest extends TestCase
{
/**
* @covers ::__construct
+7 -5
View File
@@ -9,17 +9,18 @@
* @license http://www.opensource.org/licenses/mit-license.php MIT
* @link http://phpdoc.org
*/
namespace phpDocumentor\Reflection\DocBlock\Tags;
use Mockery as m;
use PHPUnit\Framework\TestCase;
/**
* @coversDefaultClass \phpDocumentor\Reflection\DocBlock\Tags\Author
* @covers ::<private>
*/
class AuthorTest extends \PHPUnit_Framework_TestCase
class AuthorTest extends TestCase
{
/**
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Author::__construct
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
@@ -121,7 +122,7 @@ class AuthorTest extends \PHPUnit_Framework_TestCase
{
$fixture = new Author('Mike van Riel', '[email protected]');
$this->assertSame('Mike van Riel <[email protected]>', (string)$fixture);
$this->assertSame('Mike van Riel <[email protected]>', (string) $fixture);
}
/**
@@ -132,7 +133,7 @@ class AuthorTest extends \PHPUnit_Framework_TestCase
{
$fixture = new Author('Mike van Riel', '');
$this->assertSame('Mike van Riel', (string)$fixture);
$this->assertSame('Mike van Riel', (string) $fixture);
}
/**
@@ -143,7 +144,7 @@ class AuthorTest extends \PHPUnit_Framework_TestCase
{
$fixture = Author::create('Mike van Riel <[email protected]>');
$this->assertSame('Mike van Riel <[email protected]>', (string)$fixture);
$this->assertSame('Mike van Riel <[email protected]>', (string) $fixture);
$this->assertSame('Mike van Riel', $fixture->getAuthorName());
$this->assertSame('[email protected]', $fixture->getEmail());
}
@@ -156,4 +157,5 @@ class AuthorTest extends \PHPUnit_Framework_TestCase
{
$this->assertNull(Author::create('dfgr<'));
}
}
+2 -1
View File
@@ -18,12 +18,13 @@ use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
use phpDocumentor\Reflection\Fqsen;
use phpDocumentor\Reflection\FqsenResolver;
use phpDocumentor\Reflection\Types\Context;
use PHPUnit\Framework\TestCase;
/**
* @coversDefaultClass \phpDocumentor\Reflection\DocBlock\Tags\Covers
* @covers ::<private>
*/
class CoversTest extends \PHPUnit_Framework_TestCase
class CoversTest extends TestCase
{
/**
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Covers::__construct
+2 -1
View File
@@ -16,12 +16,13 @@ use Mockery as m;
use phpDocumentor\Reflection\DocBlock\Description;
use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
use phpDocumentor\Reflection\Types\Context;
use PHPUnit\Framework\TestCase;
/**
* @coversDefaultClass \phpDocumentor\Reflection\DocBlock\Tags\Deprecated
* @covers ::<private>
*/
class DeprecatedTest extends \PHPUnit_Framework_TestCase
class DeprecatedTest extends TestCase
{
/**
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Deprecated::__construct
+2 -1
View File
@@ -3,11 +3,12 @@
namespace DocBlock\Tags;
use phpDocumentor\Reflection\DocBlock\Tags\Example;
use PHPUnit\Framework\TestCase;
/**
* @coversDefaultClass \phpDocumentor\Reflection\DocBlock\Tags\Example
*/
class ExampleTest extends \PHPUnit_Framework_TestCase
class ExampleTest extends TestCase
{
/**
* @covers ::create
@@ -18,11 +18,12 @@ use phpDocumentor\Reflection\DocBlock\Tags\Link;
use phpDocumentor\Reflection\DocBlock\Tags\Param;
use phpDocumentor\Reflection\DocBlock\Tags\Version;
use phpDocumentor\Reflection\Types\String_;
use PHPUnit\Framework\TestCase;
/**
* @coversDefaultClass \phpDocumentor\Reflection\DocBlock\Tags\Formatter\AlignFormatter
*/
class AlignFormatterTest extends \PHPUnit_Framework_TestCase
class AlignFormatterTest extends TestCase
{
/**
* @covers ::format
@@ -14,11 +14,12 @@ namespace phpDocumentor\Reflection\DocBlock\Tags\Formatter;
use phpDocumentor\Reflection\DocBlock\Description;
use phpDocumentor\Reflection\DocBlock\Tags\Generic;
use PHPUnit\Framework\TestCase;
/**
* @coversDefaultClass \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter
*/
class PassthroughFormatterTest extends \PHPUnit_Framework_TestCase
class PassthroughFormatterTest extends TestCase
{
/**
* @covers ::format
+2 -1
View File
@@ -16,12 +16,13 @@ use Mockery as m;
use phpDocumentor\Reflection\DocBlock\Description;
use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
use phpDocumentor\Reflection\Types\Context;
use PHPUnit\Framework\TestCase;
/**
* @coversDefaultClass \phpDocumentor\Reflection\DocBlock\Tags\Generic
* @covers ::<private>
*/
class GenericTest extends \PHPUnit_Framework_TestCase
class GenericTest extends TestCase
{
/**
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Generic::__construct
+2 -1
View File
@@ -16,12 +16,13 @@ use Mockery as m;
use phpDocumentor\Reflection\DocBlock\Description;
use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
use phpDocumentor\Reflection\Types\Context;
use PHPUnit\Framework\TestCase;
/**
* @coversDefaultClass \phpDocumentor\Reflection\DocBlock\Tags\Link
* @covers ::<private>
*/
class LinkTest extends \PHPUnit_Framework_TestCase
class LinkTest extends TestCase
{
/**
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Link::__construct
+2 -1
View File
@@ -25,12 +25,13 @@ use phpDocumentor\Reflection\Types\Object_;
use phpDocumentor\Reflection\Types\String_;
use phpDocumentor\Reflection\Types\This;
use phpDocumentor\Reflection\Types\Void_;
use PHPUnit\Framework\TestCase;
/**
* @coversDefaultClass \phpDocumentor\Reflection\DocBlock\Tags\Method
* @covers ::<private>
*/
class MethodTest extends \PHPUnit_Framework_TestCase
class MethodTest extends TestCase
{
/**
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Method::__construct
+2 -1
View File
@@ -18,12 +18,13 @@ use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
use phpDocumentor\Reflection\TypeResolver;
use phpDocumentor\Reflection\Types\Context;
use phpDocumentor\Reflection\Types\String_;
use PHPUnit\Framework\TestCase;
/**
* @coversDefaultClass \phpDocumentor\Reflection\DocBlock\Tags\Param
* @covers ::<private>
*/
class ParamTest extends \PHPUnit_Framework_TestCase
class ParamTest extends TestCase
{
/**
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Param::__construct
@@ -18,12 +18,13 @@ use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
use phpDocumentor\Reflection\TypeResolver;
use phpDocumentor\Reflection\Types\Context;
use phpDocumentor\Reflection\Types\String_;
use PHPUnit\Framework\TestCase;
/**
* @coversDefaultClass \phpDocumentor\Reflection\DocBlock\Tags\PropertyRead
* @covers ::<private>
*/
class PropertyReadTest extends \PHPUnit_Framework_TestCase
class PropertyReadTest extends TestCase
{
/**
* @uses \phpDocumentor\Reflection\DocBlock\Tags\PropertyRead::__construct
+2 -1
View File
@@ -18,12 +18,13 @@ use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
use phpDocumentor\Reflection\TypeResolver;
use phpDocumentor\Reflection\Types\Context;
use phpDocumentor\Reflection\Types\String_;
use PHPUnit\Framework\TestCase;
/**
* @coversDefaultClass \phpDocumentor\Reflection\DocBlock\Tags\Property
* @covers ::<private>
*/
class PropertyTest extends \PHPUnit_Framework_TestCase
class PropertyTest extends TestCase
{
/**
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Property::__construct
@@ -18,12 +18,13 @@ use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
use phpDocumentor\Reflection\TypeResolver;
use phpDocumentor\Reflection\Types\Context;
use phpDocumentor\Reflection\Types\String_;
use PHPUnit\Framework\TestCase;
/**
* @coversDefaultClass \phpDocumentor\Reflection\DocBlock\Tags\PropertyWrite
* @covers ::<private>
*/
class PropertyWriteTest extends \PHPUnit_Framework_TestCase
class PropertyWriteTest extends TestCase
{
/**
* @uses \phpDocumentor\Reflection\DocBlock\Tags\PropertyWrite::__construct
+2 -1
View File
@@ -18,12 +18,13 @@ use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
use phpDocumentor\Reflection\TypeResolver;
use phpDocumentor\Reflection\Types\Context;
use phpDocumentor\Reflection\Types\String_;
use PHPUnit\Framework\TestCase;
/**
* @coversDefaultClass \phpDocumentor\Reflection\DocBlock\Tags\Return_
* @covers ::<private>
*/
class ReturnTest extends \PHPUnit_Framework_TestCase
class ReturnTest extends TestCase
{
/**
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Return_::__construct
+2 -1
View File
@@ -20,12 +20,13 @@ use phpDocumentor\Reflection\DocBlock\Tags\Reference\Url as UrlRef;
use phpDocumentor\Reflection\Fqsen;
use phpDocumentor\Reflection\FqsenResolver;
use phpDocumentor\Reflection\Types\Context;
use PHPUnit\Framework\TestCase;
/**
* @coversDefaultClass \phpDocumentor\Reflection\DocBlock\Tags\See
* @covers ::<private>
*/
class SeeTest extends \PHPUnit_Framework_TestCase
class SeeTest extends TestCase
{
/**
* @uses \phpDocumentor\Reflection\DocBlock\Tags\See::__construct
+2 -1
View File
@@ -16,12 +16,13 @@ use Mockery as m;
use phpDocumentor\Reflection\DocBlock\Description;
use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
use phpDocumentor\Reflection\Types\Context;
use PHPUnit\Framework\TestCase;
/**
* @coversDefaultClass \phpDocumentor\Reflection\DocBlock\Tags\Since
* @covers ::<private>
*/
class SinceTest extends \PHPUnit_Framework_TestCase
class SinceTest extends TestCase
{
/**
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Since::__construct
+3 -1
View File
@@ -16,12 +16,14 @@ use Mockery as m;
use phpDocumentor\Reflection\DocBlock\Description;
use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
use phpDocumentor\Reflection\Types\Context;
use phpDocumentor\Reflection\Types\String_;
use PHPUnit\Framework\TestCase;
/**
* @coversDefaultClass \phpDocumentor\Reflection\DocBlock\Tags\Source
* @covers ::<private>
*/
class SourceTest extends \PHPUnit_Framework_TestCase
class SourceTest extends TestCase
{
/**
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Source::__construct
+2 -1
View File
@@ -18,12 +18,13 @@ use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
use phpDocumentor\Reflection\TypeResolver;
use phpDocumentor\Reflection\Types\Context;
use phpDocumentor\Reflection\Types\String_;
use PHPUnit\Framework\TestCase;
/**
* @coversDefaultClass \phpDocumentor\Reflection\DocBlock\Tags\Throws
* @covers ::<private>
*/
class ThrowsTest extends \PHPUnit_Framework_TestCase
class ThrowsTest extends TestCase
{
/**
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Throws::__construct
+2 -1
View File
@@ -18,12 +18,13 @@ use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
use phpDocumentor\Reflection\Fqsen;
use phpDocumentor\Reflection\FqsenResolver;
use phpDocumentor\Reflection\Types\Context;
use PHPUnit\Framework\TestCase;
/**
* @coversDefaultClass \phpDocumentor\Reflection\DocBlock\Tags\Uses
* @covers ::<private>
*/
class UsesTest extends \PHPUnit_Framework_TestCase
class UsesTest extends TestCase
{
/**
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Uses::__construct
+2 -1
View File
@@ -18,12 +18,13 @@ use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
use phpDocumentor\Reflection\TypeResolver;
use phpDocumentor\Reflection\Types\Context;
use phpDocumentor\Reflection\Types\String_;
use PHPUnit\Framework\TestCase;
/**
* @coversDefaultClass \phpDocumentor\Reflection\DocBlock\Tags\Var_
* @covers ::<private>
*/
class VarTest extends \PHPUnit_Framework_TestCase
class VarTest extends TestCase
{
/**
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Var_::__construct
+2 -1
View File
@@ -16,12 +16,13 @@ use Mockery as m;
use phpDocumentor\Reflection\DocBlock\Description;
use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
use phpDocumentor\Reflection\Types\Context;
use PHPUnit\Framework\TestCase;
/**
* @coversDefaultClass \phpDocumentor\Reflection\DocBlock\Tags\Version
* @covers ::<private>
*/
class VersionTest extends \PHPUnit_Framework_TestCase
class VersionTest extends TestCase
{
/**
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Version::__construct
+2 -1
View File
@@ -19,6 +19,7 @@ use phpDocumentor\Reflection\DocBlock\Tag;
use phpDocumentor\Reflection\DocBlock\TagFactory;
use phpDocumentor\Reflection\DocBlock\Tags\Param;
use phpDocumentor\Reflection\Types\Context;
use PHPUnit\Framework\TestCase;
/**
* @coversDefaultClass phpDocumentor\Reflection\DocBlockFactory
@@ -26,7 +27,7 @@ use phpDocumentor\Reflection\Types\Context;
* @uses \Webmozart\Assert\Assert
* @uses phpDocumentor\Reflection\DocBlock
*/
class DocBlockFactoryTest extends \PHPUnit_Framework_TestCase
class DocBlockFactoryTest extends TestCase
{
/**
* @covers ::__construct
+2 -1
View File
@@ -15,13 +15,14 @@ namespace phpDocumentor\Reflection;
use Mockery as m;
use phpDocumentor\Reflection\DocBlock\Tags\Deprecated;
use phpDocumentor\Reflection\Types\Context;
use PHPUnit\Framework\TestCase;
/**
* @coversDefaultClass phpDocumentor\Reflection\DocBlock
* @covers ::<private>
* @uses \Webmozart\Assert\Assert
*/
class DocBlockTest extends \PHPUnit_Framework_TestCase
class DocBlockTest extends TestCase
{
/**
* @covers ::__construct