mirror of
https://github.com/barryvdh/ReflectionDocBlock.git
synced 2026-08-18 01:57:13 +00:00
add PHP 7.1 typehints
This commit is contained in:
committed by
Jaap van Otterdijk
parent
f9d1a0c177
commit
4a9675841b
@@ -24,12 +24,12 @@ final class DocblocksWithAnnotationsTest extends TestCase
|
||||
/**
|
||||
* Call Mockery::close after each test.
|
||||
*/
|
||||
public function tearDown()
|
||||
public function tearDown(): void
|
||||
{
|
||||
m::close();
|
||||
}
|
||||
|
||||
public function testDocblockWithAnnotations()
|
||||
public function testDocblockWithAnnotations(): void
|
||||
{
|
||||
$docComment = <<<DOCCOMMENT
|
||||
/**
|
||||
|
||||
@@ -28,12 +28,12 @@ class InterpretingDocBlocksTest extends TestCase
|
||||
/**
|
||||
* Call Mockery::close after each test.
|
||||
*/
|
||||
public function tearDown()
|
||||
public function tearDown(): void
|
||||
{
|
||||
m::close();
|
||||
}
|
||||
|
||||
public function testInterpretingASimpleDocBlock()
|
||||
public function testInterpretingASimpleDocBlock(): void
|
||||
{
|
||||
/**
|
||||
* @var DocBlock $docblock
|
||||
@@ -56,7 +56,7 @@ DESCRIPTION;
|
||||
$this->assertEmpty($docblock->getTags());
|
||||
}
|
||||
|
||||
public function testInterpretingTags()
|
||||
public function testInterpretingTags(): void
|
||||
{
|
||||
/**
|
||||
* @var DocBlock $docblock
|
||||
@@ -78,7 +78,7 @@ DESCRIPTION;
|
||||
$this->assertSame('', (string)$seeTag->getDescription());
|
||||
}
|
||||
|
||||
public function testDescriptionsCanEscapeAtSignsAndClosingBraces()
|
||||
public function testDescriptionsCanEscapeAtSignsAndClosingBraces(): void
|
||||
{
|
||||
/**
|
||||
* @var string $docComment
|
||||
|
||||
@@ -24,12 +24,12 @@ class ReconstitutingADocBlockTest extends TestCase
|
||||
/**
|
||||
* Call Mockery::close after each test.
|
||||
*/
|
||||
public function tearDown()
|
||||
public function tearDown(): void
|
||||
{
|
||||
m::close();
|
||||
}
|
||||
|
||||
public function testReconstituteADocBlock()
|
||||
public function testReconstituteADocBlock(): void
|
||||
{
|
||||
/**
|
||||
* @var string $docComment
|
||||
|
||||
@@ -26,12 +26,12 @@ class UsingTagsTest extends TestCase
|
||||
/**
|
||||
* Call Mockery::close after each test.
|
||||
*/
|
||||
public function tearDown()
|
||||
public function tearDown(): void
|
||||
{
|
||||
m::close();
|
||||
}
|
||||
|
||||
public function testAddingYourOwnTagUsingAStaticMethodAsFactory()
|
||||
public function testAddingYourOwnTagUsingAStaticMethodAsFactory(): void
|
||||
{
|
||||
/**
|
||||
* @var object[] $customTagObjects
|
||||
|
||||
@@ -27,7 +27,7 @@ class DescriptionFactoryTest extends TestCase
|
||||
/**
|
||||
* Call Mockery::close after each test.
|
||||
*/
|
||||
public function tearDown()
|
||||
public function tearDown(): void
|
||||
{
|
||||
m::close();
|
||||
}
|
||||
@@ -38,7 +38,7 @@ class DescriptionFactoryTest extends TestCase
|
||||
* @uses phpDocumentor\Reflection\DocBlock\Description
|
||||
* @dataProvider provideSimpleExampleDescriptions
|
||||
*/
|
||||
public function testDescriptionCanParseASimpleString($contents)
|
||||
public function testDescriptionCanParseASimpleString($contents): void
|
||||
{
|
||||
$tagFactory = m::mock(TagFactory::class);
|
||||
$tagFactory->shouldReceive('create')->never();
|
||||
@@ -55,7 +55,7 @@ class DescriptionFactoryTest extends TestCase
|
||||
* @uses phpDocumentor\Reflection\DocBlock\Description
|
||||
* @dataProvider provideEscapeSequences
|
||||
*/
|
||||
public function testEscapeSequences($contents, $expected)
|
||||
public function testEscapeSequences($contents, $expected): void
|
||||
{
|
||||
$tagFactory = m::mock(TagFactory::class);
|
||||
$tagFactory->shouldReceive('create')->never();
|
||||
@@ -75,7 +75,7 @@ class DescriptionFactoryTest extends TestCase
|
||||
* @uses phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter
|
||||
* @uses phpDocumentor\Reflection\Types\Context
|
||||
*/
|
||||
public function testDescriptionCanParseAStringWithInlineTag()
|
||||
public function testDescriptionCanParseAStringWithInlineTag(): void
|
||||
{
|
||||
$contents = 'This is text for a {@link http://phpdoc.org/ description} that uses an inline tag.';
|
||||
$context = new Context('');
|
||||
@@ -100,7 +100,7 @@ class DescriptionFactoryTest extends TestCase
|
||||
* @uses phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter
|
||||
* @uses phpDocumentor\Reflection\Types\Context
|
||||
*/
|
||||
public function testDescriptionCanParseAStringStartingWithInlineTag()
|
||||
public function testDescriptionCanParseAStringStartingWithInlineTag(): void
|
||||
{
|
||||
$contents = '{@link http://phpdoc.org/ This} is text for a description that starts with an inline tag.';
|
||||
$context = new Context('');
|
||||
@@ -121,7 +121,7 @@ class DescriptionFactoryTest extends TestCase
|
||||
* @covers ::create
|
||||
* @uses phpDocumentor\Reflection\DocBlock\Description
|
||||
*/
|
||||
public function testIfSuperfluousStartingSpacesAreRemoved()
|
||||
public function testIfSuperfluousStartingSpacesAreRemoved(): void
|
||||
{
|
||||
$factory = new DescriptionFactory(m::mock(TagFactory::class));
|
||||
$descriptionText = <<<DESCRIPTION
|
||||
|
||||
@@ -26,7 +26,7 @@ class DescriptionTest extends TestCase
|
||||
/**
|
||||
* Call Mockery::close after each test.
|
||||
*/
|
||||
public function tearDown()
|
||||
public function tearDown(): void
|
||||
{
|
||||
m::close();
|
||||
}
|
||||
@@ -38,7 +38,7 @@ class DescriptionTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\BaseTag
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter
|
||||
*/
|
||||
public function testDescriptionCanRenderUsingABodyWithPlaceholdersAndTags()
|
||||
public function testDescriptionCanRenderUsingABodyWithPlaceholdersAndTags(): void
|
||||
{
|
||||
$body = 'This is a %1$s body.';
|
||||
$expected = 'This is a {@internal significant} body.';
|
||||
@@ -63,7 +63,7 @@ class DescriptionTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\BaseTag
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter
|
||||
*/
|
||||
public function testDescriptionCanBeCastToString()
|
||||
public function testDescriptionCanBeCastToString(): void
|
||||
{
|
||||
$body = 'This is a %1$s body.';
|
||||
$expected = 'This is a {@internal significant} body.';
|
||||
@@ -79,7 +79,7 @@ class DescriptionTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Generic
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\BaseTag
|
||||
*/
|
||||
public function testDescriptionTagsGetter()
|
||||
public function testDescriptionTagsGetter(): void
|
||||
{
|
||||
$body = '@JoinTable(name="table", joinColumns=%1$s, inverseJoinColumns=%2$s)';
|
||||
|
||||
@@ -109,7 +109,7 @@ class DescriptionTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\BaseTag
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter
|
||||
*/
|
||||
public function testDescriptionMultipleTagsCanBeCastToString()
|
||||
public function testDescriptionMultipleTagsCanBeCastToString(): void
|
||||
{
|
||||
$body = '@JoinTable(name="table", joinColumns=%1$s, inverseJoinColumns=%2$s)';
|
||||
|
||||
|
||||
@@ -18,12 +18,12 @@ class ExampleFinderTest extends TestCase
|
||||
/**
|
||||
* Call Mockery::close after each test.
|
||||
*/
|
||||
public function tearDown()
|
||||
public function tearDown(): void
|
||||
{
|
||||
m::close();
|
||||
}
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
$this->fixture = new ExampleFinder();
|
||||
}
|
||||
@@ -34,7 +34,7 @@ class ExampleFinderTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Example
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
*/
|
||||
public function testFileNotFound()
|
||||
public function testFileNotFound(): void
|
||||
{
|
||||
$example = new Example('./example.php', false, 1, 0, new Description('Test'));
|
||||
$this->assertSame('** File not found : ./example.php **', $this->fixture->find($example));
|
||||
|
||||
@@ -26,7 +26,7 @@ class SerializerTest extends TestCase
|
||||
/**
|
||||
* Call Mockery::close after each test.
|
||||
*/
|
||||
public function tearDown()
|
||||
public function tearDown(): void
|
||||
{
|
||||
m::close();
|
||||
}
|
||||
@@ -40,7 +40,7 @@ class SerializerTest extends TestCase
|
||||
* @uses phpDocumentor\Reflection\DocBlock\Tags\BaseTag
|
||||
* @uses phpDocumentor\Reflection\DocBlock\Tags\Generic
|
||||
*/
|
||||
public function testReconstructsADocCommentFromADocBlock()
|
||||
public function testReconstructsADocCommentFromADocBlock(): void
|
||||
{
|
||||
$expected = <<<'DOCCOMMENT'
|
||||
/**
|
||||
@@ -74,7 +74,7 @@ DOCCOMMENT;
|
||||
* @uses phpDocumentor\Reflection\DocBlock\Tags\BaseTag
|
||||
* @uses phpDocumentor\Reflection\DocBlock\Tags\Generic
|
||||
*/
|
||||
public function testAddPrefixToDocBlock()
|
||||
public function testAddPrefixToDocBlock(): void
|
||||
{
|
||||
$expected = <<<'DOCCOMMENT'
|
||||
aa/**
|
||||
@@ -108,7 +108,7 @@ DOCCOMMENT;
|
||||
* @uses phpDocumentor\Reflection\DocBlock\Tags\BaseTag
|
||||
* @uses phpDocumentor\Reflection\DocBlock\Tags\Generic
|
||||
*/
|
||||
public function testAddPrefixToDocBlockExceptFirstLine()
|
||||
public function testAddPrefixToDocBlockExceptFirstLine(): void
|
||||
{
|
||||
$expected = <<<'DOCCOMMENT'
|
||||
/**
|
||||
@@ -142,7 +142,7 @@ DOCCOMMENT;
|
||||
* @uses phpDocumentor\Reflection\DocBlock\Tags\BaseTag
|
||||
* @uses phpDocumentor\Reflection\DocBlock\Tags\Generic
|
||||
*/
|
||||
public function testWordwrapsAroundTheGivenAmountOfCharacters()
|
||||
public function testWordwrapsAroundTheGivenAmountOfCharacters(): void
|
||||
{
|
||||
$expected = <<<'DOCCOMMENT'
|
||||
/**
|
||||
|
||||
@@ -36,7 +36,7 @@ class StandardTagFactoryTest extends TestCase
|
||||
/**
|
||||
* Call Mockery::close after each test.
|
||||
*/
|
||||
public function tearDown()
|
||||
public function tearDown(): void
|
||||
{
|
||||
m::close();
|
||||
}
|
||||
@@ -49,7 +49,7 @@ class StandardTagFactoryTest extends TestCase
|
||||
* @uses phpDocumentor\Reflection\DocBlock\Tags\BaseTag
|
||||
* @uses phpDocumentor\Reflection\DocBlock\Description
|
||||
*/
|
||||
public function testCreatingAGenericTag()
|
||||
public function testCreatingAGenericTag(): void
|
||||
{
|
||||
$expectedTagName = 'unknown-tag';
|
||||
$expectedDescriptionText = 'This is a description';
|
||||
@@ -81,7 +81,7 @@ class StandardTagFactoryTest extends TestCase
|
||||
* @uses phpDocumentor\Reflection\DocBlock\Tags\Author
|
||||
* @uses phpDocumentor\Reflection\DocBlock\Tags\BaseTag
|
||||
*/
|
||||
public function testCreatingASpecificTag()
|
||||
public function testCreatingASpecificTag(): void
|
||||
{
|
||||
$context = new Context('');
|
||||
$tagFactory = new StandardTagFactory(m::mock(FqsenResolver::class));
|
||||
@@ -102,7 +102,7 @@ class StandardTagFactoryTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\Fqsen
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Reference\Fqsen
|
||||
*/
|
||||
public function testAnEmptyContextIsCreatedIfNoneIsProvided()
|
||||
public function testAnEmptyContextIsCreatedIfNoneIsProvided(): void
|
||||
{
|
||||
$fqsen = '\Tag';
|
||||
$resolver = m::mock(FqsenResolver::class)
|
||||
@@ -130,7 +130,7 @@ class StandardTagFactoryTest extends TestCase
|
||||
* @uses phpDocumentor\Reflection\DocBlock\Tags\Author
|
||||
* @uses phpDocumentor\Reflection\DocBlock\Tags\BaseTag
|
||||
*/
|
||||
public function testPassingYourOwnSetOfTagHandlers()
|
||||
public function testPassingYourOwnSetOfTagHandlers(): void
|
||||
{
|
||||
$context = new Context('');
|
||||
$tagFactory = new StandardTagFactory(m::mock(FqsenResolver::class), ['user' => Author::class]);
|
||||
@@ -149,7 +149,7 @@ class StandardTagFactoryTest extends TestCase
|
||||
* @expectedException \InvalidArgumentException
|
||||
* @expectedExceptionMessage The tag "@user[myuser" does not seem to be wellformed, please check it for errors
|
||||
*/
|
||||
public function testExceptionIsThrownIfProvidedTagIsNotWellformed()
|
||||
public function testExceptionIsThrownIfProvidedTagIsNotWellformed(): void
|
||||
{
|
||||
$tagFactory = new StandardTagFactory(m::mock(FqsenResolver::class));
|
||||
$tagFactory->create('@user[myuser');
|
||||
@@ -160,7 +160,7 @@ class StandardTagFactoryTest extends TestCase
|
||||
* @covers ::addParameter
|
||||
* @uses phpDocumentor\Reflection\DocBlock\StandardTagFactory::addService
|
||||
*/
|
||||
public function testAddParameterToServiceLocator()
|
||||
public function testAddParameterToServiceLocator(): void
|
||||
{
|
||||
$resolver = m::mock(FqsenResolver::class);
|
||||
$tagFactory = new StandardTagFactory($resolver);
|
||||
@@ -177,7 +177,7 @@ class StandardTagFactoryTest extends TestCase
|
||||
* @covers ::addService
|
||||
* @uses phpDocumentor\Reflection\DocBlock\StandardTagFactory::__construct
|
||||
*/
|
||||
public function testAddServiceToServiceLocator()
|
||||
public function testAddServiceToServiceLocator(): void
|
||||
{
|
||||
$service = new PassthroughFormatter();
|
||||
|
||||
@@ -196,7 +196,7 @@ class StandardTagFactoryTest extends TestCase
|
||||
* @covers ::addService
|
||||
* @uses phpDocumentor\Reflection\DocBlock\StandardTagFactory::__construct
|
||||
*/
|
||||
public function testInjectConcreteServiceForInterfaceToServiceLocator()
|
||||
public function testInjectConcreteServiceForInterfaceToServiceLocator(): void
|
||||
{
|
||||
$interfaceName = Formatter::class;
|
||||
$service = new PassthroughFormatter();
|
||||
@@ -219,7 +219,7 @@ class StandardTagFactoryTest extends TestCase
|
||||
* @uses phpDocumentor\Reflection\DocBlock\StandardTagFactory::create
|
||||
* @uses phpDocumentor\Reflection\DocBlock\Tags\Author
|
||||
*/
|
||||
public function testRegisteringAHandlerForANewTag()
|
||||
public function testRegisteringAHandlerForANewTag(): void
|
||||
{
|
||||
$resolver = m::mock(FqsenResolver::class);
|
||||
$tagFactory = new StandardTagFactory($resolver);
|
||||
@@ -237,7 +237,7 @@ class StandardTagFactoryTest extends TestCase
|
||||
* @uses phpDocumentor\Reflection\DocBlock\StandardTagFactory::addService
|
||||
* @expectedException \InvalidArgumentException
|
||||
*/
|
||||
public function testHandlerRegistrationFailsIfProvidedTagNameIsNamespaceButNotFullyQualified()
|
||||
public function testHandlerRegistrationFailsIfProvidedTagNameIsNamespaceButNotFullyQualified(): void
|
||||
{
|
||||
$resolver = m::mock(FqsenResolver::class);
|
||||
$tagFactory = new StandardTagFactory($resolver);
|
||||
@@ -251,7 +251,7 @@ class StandardTagFactoryTest extends TestCase
|
||||
* @uses phpDocumentor\Reflection\DocBlock\StandardTagFactory::addService
|
||||
* @expectedException \InvalidArgumentException
|
||||
*/
|
||||
public function testHandlerRegistrationFailsIfProvidedHandlerIsEmpty()
|
||||
public function testHandlerRegistrationFailsIfProvidedHandlerIsEmpty(): void
|
||||
{
|
||||
$resolver = m::mock(FqsenResolver::class);
|
||||
$tagFactory = new StandardTagFactory($resolver);
|
||||
@@ -265,7 +265,7 @@ class StandardTagFactoryTest extends TestCase
|
||||
* @uses phpDocumentor\Reflection\DocBlock\StandardTagFactory::addService
|
||||
* @expectedException \InvalidArgumentException
|
||||
*/
|
||||
public function testHandlerRegistrationFailsIfProvidedHandlerIsNotAnExistingClassName()
|
||||
public function testHandlerRegistrationFailsIfProvidedHandlerIsNotAnExistingClassName(): void
|
||||
{
|
||||
$resolver = m::mock(FqsenResolver::class);
|
||||
$tagFactory = new StandardTagFactory($resolver);
|
||||
@@ -279,7 +279,7 @@ class StandardTagFactoryTest extends TestCase
|
||||
* @uses phpDocumentor\Reflection\DocBlock\StandardTagFactory::addService
|
||||
* @expectedException \InvalidArgumentException
|
||||
*/
|
||||
public function testHandlerRegistrationFailsIfProvidedHandlerDoesNotImplementTheTagInterface()
|
||||
public function testHandlerRegistrationFailsIfProvidedHandlerDoesNotImplementTheTagInterface(): void
|
||||
{
|
||||
$resolver = m::mock(FqsenResolver::class);
|
||||
$tagFactory = new StandardTagFactory($resolver);
|
||||
@@ -295,7 +295,7 @@ class StandardTagFactoryTest extends TestCase
|
||||
* @uses phpDocumentor\Reflection\Docblock\Tags\Return_
|
||||
* @uses phpDocumentor\Reflection\Docblock\Tags\BaseTag
|
||||
*/
|
||||
public function testReturntagIsMappedCorrectly()
|
||||
public function testReturntagIsMappedCorrectly(): void
|
||||
{
|
||||
$context = new Context('');
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ class AuthorTest extends TestCase
|
||||
/**
|
||||
* Call Mockery::close after each test.
|
||||
*/
|
||||
public function tearDown()
|
||||
public function tearDown(): void
|
||||
{
|
||||
m::close();
|
||||
}
|
||||
@@ -34,7 +34,7 @@ class AuthorTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Author::__construct
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||
*/
|
||||
public function testIfCorrectTagNameIsReturned()
|
||||
public function testIfCorrectTagNameIsReturned(): void
|
||||
{
|
||||
$fixture = new Author('Mike van Riel', '[email protected]');
|
||||
|
||||
@@ -48,7 +48,7 @@ class AuthorTest extends TestCase
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||
*/
|
||||
public function testIfTagCanBeRenderedUsingDefaultFormatter()
|
||||
public function testIfTagCanBeRenderedUsingDefaultFormatter(): void
|
||||
{
|
||||
$fixture = new Author('Mike van Riel', '[email protected]');
|
||||
|
||||
@@ -59,7 +59,7 @@ class AuthorTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Author::__construct
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||
*/
|
||||
public function testIfTagCanBeRenderedUsingSpecificFormatter()
|
||||
public function testIfTagCanBeRenderedUsingSpecificFormatter(): void
|
||||
{
|
||||
$fixture = new Author('Mike van Riel', '[email protected]');
|
||||
|
||||
@@ -73,7 +73,7 @@ class AuthorTest extends TestCase
|
||||
* @covers ::__construct
|
||||
* @covers ::getAuthorName
|
||||
*/
|
||||
public function testHasTheAuthorName()
|
||||
public function testHasTheAuthorName(): void
|
||||
{
|
||||
$expected = 'Mike van Riel';
|
||||
|
||||
@@ -86,7 +86,7 @@ class AuthorTest extends TestCase
|
||||
* @covers ::__construct
|
||||
* @covers ::getEmail
|
||||
*/
|
||||
public function testHasTheAuthorMailAddress()
|
||||
public function testHasTheAuthorMailAddress(): void
|
||||
{
|
||||
$expected = '[email protected]';
|
||||
|
||||
@@ -99,7 +99,7 @@ class AuthorTest extends TestCase
|
||||
* @covers ::__construct
|
||||
* @expectedException \InvalidArgumentException
|
||||
*/
|
||||
public function testInitializationFailsIfEmailIsNotValid()
|
||||
public function testInitializationFailsIfEmailIsNotValid(): void
|
||||
{
|
||||
new Author('Mike van Riel', 'mike');
|
||||
}
|
||||
@@ -108,7 +108,7 @@ class AuthorTest extends TestCase
|
||||
* @covers ::__construct
|
||||
* @covers ::__toString
|
||||
*/
|
||||
public function testStringRepresentationIsReturned()
|
||||
public function testStringRepresentationIsReturned(): void
|
||||
{
|
||||
$fixture = new Author('Mike van Riel', '[email protected]');
|
||||
|
||||
@@ -119,7 +119,7 @@ class AuthorTest extends TestCase
|
||||
* @covers ::__construct
|
||||
* @covers ::__toString
|
||||
*/
|
||||
public function testStringRepresentationWithEmtpyEmail()
|
||||
public function testStringRepresentationWithEmtpyEmail(): void
|
||||
{
|
||||
$fixture = new Author('Mike van Riel', '');
|
||||
|
||||
@@ -130,7 +130,7 @@ class AuthorTest extends TestCase
|
||||
* @covers ::create
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Author::<public>
|
||||
*/
|
||||
public function testFactoryMethod()
|
||||
public function testFactoryMethod(): void
|
||||
{
|
||||
$fixture = Author::create('Mike van Riel <[email protected]>');
|
||||
|
||||
@@ -143,7 +143,7 @@ class AuthorTest extends TestCase
|
||||
* @covers ::create
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Author::<public>
|
||||
*/
|
||||
public function testFactoryMethodReturnsNullIfItCouldNotReadBody()
|
||||
public function testFactoryMethodReturnsNullIfItCouldNotReadBody(): void
|
||||
{
|
||||
$this->assertNull(Author::create('dfgr<'));
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ class CoversTest extends TestCase
|
||||
/**
|
||||
* Call Mockery::close after each test.
|
||||
*/
|
||||
public function tearDown()
|
||||
public function tearDown(): void
|
||||
{
|
||||
m::close();
|
||||
}
|
||||
@@ -41,7 +41,7 @@ class CoversTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||
*/
|
||||
public function testIfCorrectTagNameIsReturned()
|
||||
public function testIfCorrectTagNameIsReturned(): void
|
||||
{
|
||||
$fixture = new Covers(new Fqsen('\DateTime'), new Description('Description'));
|
||||
|
||||
@@ -56,7 +56,7 @@ class CoversTest extends TestCase
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||
*/
|
||||
public function testIfTagCanBeRenderedUsingDefaultFormatter()
|
||||
public function testIfTagCanBeRenderedUsingDefaultFormatter(): void
|
||||
{
|
||||
$fixture = new Covers(new Fqsen('\DateTime'), new Description('Description'));
|
||||
|
||||
@@ -68,7 +68,7 @@ class CoversTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||
*/
|
||||
public function testIfTagCanBeRenderedUsingSpecificFormatter()
|
||||
public function testIfTagCanBeRenderedUsingSpecificFormatter(): void
|
||||
{
|
||||
$fixture = new Covers(new Fqsen('\DateTime'), new Description('Description'));
|
||||
|
||||
@@ -82,7 +82,7 @@ class CoversTest extends TestCase
|
||||
* @covers ::__construct
|
||||
* @covers ::getReference
|
||||
*/
|
||||
public function testHasReferenceToFqsen()
|
||||
public function testHasReferenceToFqsen(): void
|
||||
{
|
||||
$expected = new Fqsen('\DateTime');
|
||||
|
||||
@@ -96,7 +96,7 @@ class CoversTest extends TestCase
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getDescription
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
*/
|
||||
public function testHasDescription()
|
||||
public function testHasDescription(): void
|
||||
{
|
||||
$expected = new Description('Description');
|
||||
|
||||
@@ -110,7 +110,7 @@ class CoversTest extends TestCase
|
||||
* @covers ::__toString
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
*/
|
||||
public function testStringRepresentationIsReturned()
|
||||
public function testStringRepresentationIsReturned(): void
|
||||
{
|
||||
$fixture = new Covers(new Fqsen('\DateTime'), new Description('Description'));
|
||||
|
||||
@@ -126,7 +126,7 @@ class CoversTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\Fqsen
|
||||
* @uses \phpDocumentor\Reflection\Types\Context
|
||||
*/
|
||||
public function testFactoryMethod()
|
||||
public function testFactoryMethod(): void
|
||||
{
|
||||
$descriptionFactory = m::mock(DescriptionFactory::class);
|
||||
$resolver = m::mock(FqsenResolver::class);
|
||||
@@ -150,7 +150,7 @@ class CoversTest extends TestCase
|
||||
* @covers ::create
|
||||
* @expectedException \InvalidArgumentException
|
||||
*/
|
||||
public function testFactoryMethodFailsIfBodyIsNotEmpty()
|
||||
public function testFactoryMethodFailsIfBodyIsNotEmpty(): void
|
||||
{
|
||||
$this->assertNull(Covers::create(''));
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ class DeprecatedTest extends TestCase
|
||||
/**
|
||||
* Call Mockery::close after each test.
|
||||
*/
|
||||
public function tearDown()
|
||||
public function tearDown(): void
|
||||
{
|
||||
m::close();
|
||||
}
|
||||
@@ -38,7 +38,7 @@ class DeprecatedTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||
*/
|
||||
public function testIfCorrectTagNameIsReturned()
|
||||
public function testIfCorrectTagNameIsReturned(): void
|
||||
{
|
||||
$fixture = new Deprecated('1.0', new Description('Description'));
|
||||
|
||||
@@ -53,7 +53,7 @@ class DeprecatedTest extends TestCase
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||
*/
|
||||
public function testIfTagCanBeRenderedUsingDefaultFormatter()
|
||||
public function testIfTagCanBeRenderedUsingDefaultFormatter(): void
|
||||
{
|
||||
$fixture = new Deprecated('1.0', new Description('Description'));
|
||||
|
||||
@@ -65,7 +65,7 @@ class DeprecatedTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||
*/
|
||||
public function testIfTagCanBeRenderedUsingSpecificFormatter()
|
||||
public function testIfTagCanBeRenderedUsingSpecificFormatter(): void
|
||||
{
|
||||
$fixture = new Deprecated('1.0', new Description('Description'));
|
||||
|
||||
@@ -146,7 +146,7 @@ class DeprecatedTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
* @uses \phpDocumentor\Reflection\Types\Context
|
||||
*/
|
||||
public function testFactoryMethodCreatesEmptyDeprecatedTag()
|
||||
public function testFactoryMethodCreatesEmptyDeprecatedTag(): void
|
||||
{
|
||||
$descriptionFactory = m::mock(DescriptionFactory::class);
|
||||
$descriptionFactory->shouldReceive('create')->never();
|
||||
@@ -162,7 +162,7 @@ class DeprecatedTest extends TestCase
|
||||
* @covers ::create
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Deprecated::__construct
|
||||
*/
|
||||
public function testFactoryMethodReturnsNullIfBodyDoesNotMatchRegex()
|
||||
public function testFactoryMethodReturnsNullIfBodyDoesNotMatchRegex(): void
|
||||
{
|
||||
$this->assertEquals(new Deprecated(), Deprecated::create('dkhf<'));
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ class ExampleTest extends TestCase
|
||||
/**
|
||||
* Call Mockery::close after each test.
|
||||
*/
|
||||
public function tearDown()
|
||||
public function tearDown(): void
|
||||
{
|
||||
m::close();
|
||||
}
|
||||
@@ -26,7 +26,7 @@ class ExampleTest extends TestCase
|
||||
* @covers ::getContent
|
||||
* @uses phpDocumentor\Reflection\DocBlock\Tags\BaseTag
|
||||
*/
|
||||
public function testExampleWithoutContent()
|
||||
public function testExampleWithoutContent(): void
|
||||
{
|
||||
$tag = Example::create('"example1.php"');
|
||||
$this->assertEquals('"example1.php"', $tag->getContent());
|
||||
@@ -41,7 +41,7 @@ class ExampleTest extends TestCase
|
||||
* @covers ::getDescription
|
||||
* @uses phpDocumentor\Reflection\DocBlock\Tags\BaseTag
|
||||
*/
|
||||
public function testWithDescription()
|
||||
public function testWithDescription(): void
|
||||
{
|
||||
$tag = Example::create('"example1.php" some text');
|
||||
$this->assertEquals('example1.php', $tag->getFilePath());
|
||||
@@ -55,7 +55,7 @@ class ExampleTest extends TestCase
|
||||
* @covers ::getStartingLine
|
||||
* @uses phpDocumentor\Reflection\DocBlock\Tags\BaseTag
|
||||
*/
|
||||
public function testStartlineIsParsed()
|
||||
public function testStartlineIsParsed(): void
|
||||
{
|
||||
$tag = Example::create('"example1.php" 10');
|
||||
$this->assertEquals('example1.php', $tag->getFilePath());
|
||||
@@ -70,7 +70,7 @@ class ExampleTest extends TestCase
|
||||
* @covers ::getDescription
|
||||
* @uses phpDocumentor\Reflection\DocBlock\Tags\BaseTag
|
||||
*/
|
||||
public function testAllowOmitingLineCount()
|
||||
public function testAllowOmitingLineCount(): void
|
||||
{
|
||||
$tag = Example::create('"example1.php" 10 some text');
|
||||
$this->assertEquals('example1.php', $tag->getFilePath());
|
||||
@@ -86,7 +86,7 @@ class ExampleTest extends TestCase
|
||||
* @covers ::getLineCount
|
||||
* @uses phpDocumentor\Reflection\DocBlock\Tags\BaseTag
|
||||
*/
|
||||
public function testLengthIsParsed()
|
||||
public function testLengthIsParsed(): void
|
||||
{
|
||||
$tag = Example::create('"example1.php" 10 5');
|
||||
$this->assertEquals('example1.php', $tag->getFilePath());
|
||||
@@ -103,7 +103,7 @@ class ExampleTest extends TestCase
|
||||
* @covers ::getDescription
|
||||
* @uses phpDocumentor\Reflection\DocBlock\Tags\BaseTag
|
||||
*/
|
||||
public function testFullExample()
|
||||
public function testFullExample(): void
|
||||
{
|
||||
$tag = Example::create('"example1.php" 10 5 test text');
|
||||
$this->assertEquals('example1.php', $tag->getFilePath());
|
||||
|
||||
@@ -30,7 +30,7 @@ class AlignFormatterTest extends TestCase
|
||||
/**
|
||||
* Call Mockery::close after each test.
|
||||
*/
|
||||
public function tearDown()
|
||||
public function tearDown(): void
|
||||
{
|
||||
m::close();
|
||||
}
|
||||
@@ -45,7 +45,7 @@ class AlignFormatterTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Version
|
||||
* @uses \phpDocumentor\Reflection\Types\String_
|
||||
*/
|
||||
public function testFormatterCallsToStringAndReturnsAStandardRepresentation()
|
||||
public function testFormatterCallsToStringAndReturnsAStandardRepresentation(): void
|
||||
{
|
||||
$tags = [
|
||||
new Param('foobar', new String_()),
|
||||
|
||||
@@ -26,7 +26,7 @@ class PassthroughFormatterTest extends TestCase
|
||||
/**
|
||||
* Call Mockery::close after each test.
|
||||
*/
|
||||
public function tearDown()
|
||||
public function tearDown(): void
|
||||
{
|
||||
m::close();
|
||||
}
|
||||
@@ -37,7 +37,7 @@ class PassthroughFormatterTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\BaseTag
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Generic
|
||||
*/
|
||||
public function testFormatterCallsToStringAndReturnsAStandardRepresentation()
|
||||
public function testFormatterCallsToStringAndReturnsAStandardRepresentation(): void
|
||||
{
|
||||
$expected = '@unknown-tag This is a description';
|
||||
|
||||
@@ -55,7 +55,7 @@ class PassthroughFormatterTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\BaseTag
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Generic
|
||||
*/
|
||||
public function testFormatterToStringWitoutDescription()
|
||||
public function testFormatterToStringWitoutDescription(): void
|
||||
{
|
||||
$expected = '@unknown-tag';
|
||||
$fixture = new PassthroughFormatter();
|
||||
|
||||
@@ -28,7 +28,7 @@ class GenericTest extends TestCase
|
||||
/**
|
||||
* Call Mockery::close after each test.
|
||||
*/
|
||||
public function tearDown()
|
||||
public function tearDown(): void
|
||||
{
|
||||
m::close();
|
||||
}
|
||||
@@ -37,7 +37,7 @@ class GenericTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||
*/
|
||||
public function testIfCorrectTagNameIsReturned()
|
||||
public function testIfCorrectTagNameIsReturned(): void
|
||||
{
|
||||
$fixture = new Generic('generic', new Description('Description'));
|
||||
|
||||
@@ -52,7 +52,7 @@ class GenericTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||
*/
|
||||
public function testIfTagCanBeRenderedUsingDefaultFormatter()
|
||||
public function testIfTagCanBeRenderedUsingDefaultFormatter(): void
|
||||
{
|
||||
$fixture = new Generic('generic', new Description('Description'));
|
||||
|
||||
@@ -64,7 +64,7 @@ class GenericTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||
*/
|
||||
public function testIfTagCanBeRenderedUsingSpecificFormatter()
|
||||
public function testIfTagCanBeRenderedUsingSpecificFormatter(): void
|
||||
{
|
||||
$fixture = new Generic('generic', new Description('Description'));
|
||||
|
||||
@@ -79,7 +79,7 @@ class GenericTest extends TestCase
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getDescription
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
*/
|
||||
public function testHasDescription()
|
||||
public function testHasDescription(): void
|
||||
{
|
||||
$expected = new Description('Description');
|
||||
|
||||
@@ -94,7 +94,7 @@ class GenericTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||
*/
|
||||
public function testStringRepresentationIsReturned()
|
||||
public function testStringRepresentationIsReturned(): void
|
||||
{
|
||||
$fixture = new Generic('generic', new Description('Description'));
|
||||
|
||||
@@ -108,7 +108,7 @@ class GenericTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
* @uses \phpDocumentor\Reflection\Types\Context
|
||||
*/
|
||||
public function testFactoryMethod()
|
||||
public function testFactoryMethod(): void
|
||||
{
|
||||
$descriptionFactory = m::mock(DescriptionFactory::class);
|
||||
$context = new Context('');
|
||||
@@ -129,7 +129,7 @@ class GenericTest extends TestCase
|
||||
* @covers ::create
|
||||
* @expectedException \InvalidArgumentException
|
||||
*/
|
||||
public function testFactoryMethodFailsIfNameIsNotEmpty()
|
||||
public function testFactoryMethodFailsIfNameIsNotEmpty(): void
|
||||
{
|
||||
Generic::create('', '');
|
||||
}
|
||||
@@ -139,7 +139,7 @@ class GenericTest extends TestCase
|
||||
* @covers ::__construct
|
||||
* @expectedException \InvalidArgumentException
|
||||
*/
|
||||
public function testFactoryMethodFailsIfNameContainsIllegalCharacters()
|
||||
public function testFactoryMethodFailsIfNameContainsIllegalCharacters(): void
|
||||
{
|
||||
Generic::create('', 'name/myname');
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ class LinkTest extends TestCase
|
||||
/**
|
||||
* Call Mockery::close after each test.
|
||||
*/
|
||||
public function tearDown()
|
||||
public function tearDown(): void
|
||||
{
|
||||
m::close();
|
||||
}
|
||||
@@ -38,7 +38,7 @@ class LinkTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||
*/
|
||||
public function testIfCorrectTagNameIsReturned()
|
||||
public function testIfCorrectTagNameIsReturned(): void
|
||||
{
|
||||
$fixture = new Link('http://this.is.my/link', new Description('Description'));
|
||||
|
||||
@@ -53,7 +53,7 @@ class LinkTest extends TestCase
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||
*/
|
||||
public function testIfTagCanBeRenderedUsingDefaultFormatter()
|
||||
public function testIfTagCanBeRenderedUsingDefaultFormatter(): void
|
||||
{
|
||||
$fixture = new Link('http://this.is.my/link', new Description('Description'));
|
||||
|
||||
@@ -65,7 +65,7 @@ class LinkTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||
*/
|
||||
public function testIfTagCanBeRenderedUsingSpecificFormatter()
|
||||
public function testIfTagCanBeRenderedUsingSpecificFormatter(): void
|
||||
{
|
||||
$fixture = new Link('http://this.is.my/link', new Description('Description'));
|
||||
|
||||
@@ -79,7 +79,7 @@ class LinkTest extends TestCase
|
||||
* @covers ::__construct
|
||||
* @covers ::getLink
|
||||
*/
|
||||
public function testHasLinkUrl()
|
||||
public function testHasLinkUrl(): void
|
||||
{
|
||||
$expected = 'http://this.is.my/link';
|
||||
|
||||
@@ -93,7 +93,7 @@ class LinkTest extends TestCase
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getDescription
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
*/
|
||||
public function testHasDescription()
|
||||
public function testHasDescription(): void
|
||||
{
|
||||
$expected = new Description('Description');
|
||||
|
||||
@@ -107,7 +107,7 @@ class LinkTest extends TestCase
|
||||
* @covers ::__toString
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
*/
|
||||
public function testStringRepresentationIsReturned()
|
||||
public function testStringRepresentationIsReturned(): void
|
||||
{
|
||||
$fixture = new Link('http://this.is.my/link', new Description('Description'));
|
||||
|
||||
@@ -121,7 +121,7 @@ class LinkTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
* @uses \phpDocumentor\Reflection\Types\Context
|
||||
*/
|
||||
public function testFactoryMethod()
|
||||
public function testFactoryMethod(): void
|
||||
{
|
||||
$descriptionFactory = m::mock(DescriptionFactory::class);
|
||||
$context = new Context('');
|
||||
@@ -145,7 +145,7 @@ class LinkTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
* @uses \phpDocumentor\Reflection\Types\Context
|
||||
*/
|
||||
public function testFactoryMethodCreatesEmptyLinkTag()
|
||||
public function testFactoryMethodCreatesEmptyLinkTag(): void
|
||||
{
|
||||
$descriptionFactory = m::mock(DescriptionFactory::class);
|
||||
$descriptionFactory->shouldReceive('create')->never();
|
||||
|
||||
@@ -37,7 +37,7 @@ class MethodTest extends TestCase
|
||||
/**
|
||||
* Call Mockery::close after each test.
|
||||
*/
|
||||
public function tearDown()
|
||||
public function tearDown(): void
|
||||
{
|
||||
m::close();
|
||||
}
|
||||
@@ -46,7 +46,7 @@ class MethodTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Method::__construct
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||
*/
|
||||
public function testIfCorrectTagNameIsReturned()
|
||||
public function testIfCorrectTagNameIsReturned(): void
|
||||
{
|
||||
$fixture = new Method('myMethod');
|
||||
|
||||
@@ -62,7 +62,7 @@ class MethodTest extends TestCase
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||
*/
|
||||
public function testIfTagCanBeRenderedUsingDefaultFormatter()
|
||||
public function testIfTagCanBeRenderedUsingDefaultFormatter(): void
|
||||
{
|
||||
$arguments = [
|
||||
['name' => 'argument1', 'type' => new String_()],
|
||||
@@ -81,7 +81,7 @@ class MethodTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||
*/
|
||||
public function testIfTagCanBeRenderedUsingSpecificFormatter()
|
||||
public function testIfTagCanBeRenderedUsingSpecificFormatter(): void
|
||||
{
|
||||
$fixture = new Method('myMethod');
|
||||
|
||||
@@ -95,7 +95,7 @@ class MethodTest extends TestCase
|
||||
* @covers ::__construct
|
||||
* @covers ::getMethodName
|
||||
*/
|
||||
public function testHasMethodName()
|
||||
public function testHasMethodName(): void
|
||||
{
|
||||
$expected = 'myMethod';
|
||||
|
||||
@@ -108,7 +108,7 @@ class MethodTest extends TestCase
|
||||
* @covers ::__construct
|
||||
* @covers ::getArguments
|
||||
*/
|
||||
public function testHasArguments()
|
||||
public function testHasArguments(): void
|
||||
{
|
||||
$arguments = [
|
||||
[ 'name' => 'argument1', 'type' => new String_() ]
|
||||
@@ -123,7 +123,7 @@ class MethodTest extends TestCase
|
||||
* @covers ::__construct
|
||||
* @covers ::getArguments
|
||||
*/
|
||||
public function testArgumentsMayBePassedAsString()
|
||||
public function testArgumentsMayBePassedAsString(): void
|
||||
{
|
||||
$arguments = ['argument1'];
|
||||
$expected = [
|
||||
@@ -139,7 +139,7 @@ class MethodTest extends TestCase
|
||||
* @covers ::__construct
|
||||
* @covers ::getArguments
|
||||
*/
|
||||
public function testArgumentTypeCanBeInferredAsVoid()
|
||||
public function testArgumentTypeCanBeInferredAsVoid(): void
|
||||
{
|
||||
$arguments = [ [ 'name' => 'argument1' ] ];
|
||||
$expected = [
|
||||
@@ -157,7 +157,7 @@ class MethodTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Method::getArguments
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
*/
|
||||
public function testRestArgumentIsParsedAsRegularArg()
|
||||
public function testRestArgumentIsParsedAsRegularArg(): void
|
||||
{
|
||||
$expected = [
|
||||
[ 'name' => 'arg1', 'type' => new Void_() ],
|
||||
@@ -185,7 +185,7 @@ class MethodTest extends TestCase
|
||||
* @covers ::__construct
|
||||
* @covers ::getReturnType
|
||||
*/
|
||||
public function testHasReturnType()
|
||||
public function testHasReturnType(): void
|
||||
{
|
||||
$expected = new String_();
|
||||
|
||||
@@ -198,7 +198,7 @@ class MethodTest extends TestCase
|
||||
* @covers ::__construct
|
||||
* @covers ::getReturnType
|
||||
*/
|
||||
public function testReturnTypeCanBeInferredAsVoid()
|
||||
public function testReturnTypeCanBeInferredAsVoid(): void
|
||||
{
|
||||
$fixture = new Method('myMethod', []);
|
||||
|
||||
@@ -209,7 +209,7 @@ class MethodTest extends TestCase
|
||||
* @covers ::__construct
|
||||
* @covers ::isStatic
|
||||
*/
|
||||
public function testMethodCanBeStatic()
|
||||
public function testMethodCanBeStatic(): void
|
||||
{
|
||||
$expected = false;
|
||||
$fixture = new Method('myMethod', [], null, $expected);
|
||||
@@ -225,7 +225,7 @@ class MethodTest extends TestCase
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getDescription
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
*/
|
||||
public function testHasDescription()
|
||||
public function testHasDescription(): void
|
||||
{
|
||||
$expected = new Description('Description');
|
||||
|
||||
@@ -240,7 +240,7 @@ class MethodTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Method::isStatic
|
||||
*/
|
||||
public function testStringRepresentationIsReturned()
|
||||
public function testStringRepresentationIsReturned(): void
|
||||
{
|
||||
$arguments = [
|
||||
['name' => 'argument1', 'type' => new String_()],
|
||||
@@ -263,7 +263,7 @@ class MethodTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\Fqsen
|
||||
* @uses \phpDocumentor\Reflection\Types\Context
|
||||
*/
|
||||
public function testFactoryMethod()
|
||||
public function testFactoryMethod(): void
|
||||
{
|
||||
$descriptionFactory = m::mock(DescriptionFactory::class);
|
||||
$resolver = new TypeResolver();
|
||||
@@ -298,7 +298,7 @@ class MethodTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
* @uses \phpDocumentor\Reflection\Types\Context
|
||||
*/
|
||||
public function testReturnTypeThis()
|
||||
public function testReturnTypeThis(): void
|
||||
{
|
||||
$descriptionFactory = m::mock(DescriptionFactory::class);
|
||||
$resolver = new TypeResolver();
|
||||
@@ -347,9 +347,9 @@ class MethodTest extends TestCase
|
||||
public function testCollectionReturnTypes(
|
||||
string $returnType,
|
||||
string $expectedType,
|
||||
string $expectedValueType = null,
|
||||
string $expectedKeyType = null
|
||||
) {
|
||||
?string $expectedValueType = null,
|
||||
?string $expectedKeyType = null
|
||||
): void {
|
||||
$resolver = new TypeResolver();
|
||||
$descriptionFactory = m::mock(DescriptionFactory::class);
|
||||
$descriptionFactory->shouldReceive('create')->with('', null)->andReturn(new Description(''));
|
||||
@@ -368,7 +368,7 @@ class MethodTest extends TestCase
|
||||
* @covers ::create
|
||||
* @expectedException \InvalidArgumentException
|
||||
*/
|
||||
public function testFactoryMethodFailsIfBodyIsEmpty()
|
||||
public function testFactoryMethodFailsIfBodyIsEmpty(): void
|
||||
{
|
||||
Method::create('');
|
||||
}
|
||||
@@ -377,7 +377,7 @@ class MethodTest extends TestCase
|
||||
* @covers ::create
|
||||
* @expectedException \InvalidArgumentException
|
||||
*/
|
||||
public function testFactoryMethodReturnsNullIfBodyIsIncorrect()
|
||||
public function testFactoryMethodReturnsNullIfBodyIsIncorrect(): void
|
||||
{
|
||||
$this->assertNull(Method::create('body('));
|
||||
}
|
||||
@@ -386,7 +386,7 @@ class MethodTest extends TestCase
|
||||
* @covers ::create
|
||||
* @expectedException \InvalidArgumentException
|
||||
*/
|
||||
public function testFactoryMethodFailsIfResolverIsNull()
|
||||
public function testFactoryMethodFailsIfResolverIsNull(): void
|
||||
{
|
||||
Method::create('body');
|
||||
}
|
||||
@@ -395,7 +395,7 @@ class MethodTest extends TestCase
|
||||
* @covers ::create
|
||||
* @expectedException \InvalidArgumentException
|
||||
*/
|
||||
public function testFactoryMethodFailsIfDescriptionFactoryIsNull()
|
||||
public function testFactoryMethodFailsIfDescriptionFactoryIsNull(): void
|
||||
{
|
||||
Method::create('body', new TypeResolver());
|
||||
}
|
||||
@@ -404,7 +404,7 @@ class MethodTest extends TestCase
|
||||
* @covers ::__construct
|
||||
* @expectedException \InvalidArgumentException
|
||||
*/
|
||||
public function testCreationFailsIfBodyIsNotString()
|
||||
public function testCreationFailsIfBodyIsNotString(): void
|
||||
{
|
||||
new Method([]);
|
||||
}
|
||||
@@ -413,7 +413,7 @@ class MethodTest extends TestCase
|
||||
* @covers ::__construct
|
||||
* @expectedException \InvalidArgumentException
|
||||
*/
|
||||
public function testCreationFailsIfBodyIsEmpty()
|
||||
public function testCreationFailsIfBodyIsEmpty(): void
|
||||
{
|
||||
new Method('');
|
||||
}
|
||||
@@ -422,7 +422,7 @@ class MethodTest extends TestCase
|
||||
* @covers ::__construct
|
||||
* @expectedException \InvalidArgumentException
|
||||
*/
|
||||
public function testCreationFailsIfStaticIsNotBoolean()
|
||||
public function testCreationFailsIfStaticIsNotBoolean(): void
|
||||
{
|
||||
new Method('body', [], null, []);
|
||||
}
|
||||
@@ -431,7 +431,7 @@ class MethodTest extends TestCase
|
||||
* @covers ::__construct
|
||||
* @expectedException \InvalidArgumentException
|
||||
*/
|
||||
public function testCreationFailsIfArgumentRecordContainsInvalidEntry()
|
||||
public function testCreationFailsIfArgumentRecordContainsInvalidEntry(): void
|
||||
{
|
||||
new Method('body', [ [ 'name' => 'myName', 'unknown' => 'nah' ] ]);
|
||||
}
|
||||
@@ -445,7 +445,7 @@ class MethodTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\Fqsen
|
||||
* @uses \phpDocumentor\Reflection\Types\Context
|
||||
*/
|
||||
public function testCreateMethodParenthesisMissing()
|
||||
public function testCreateMethodParenthesisMissing(): void
|
||||
{
|
||||
$descriptionFactory = m::mock(DescriptionFactory::class);
|
||||
$resolver = new TypeResolver();
|
||||
@@ -479,7 +479,7 @@ class MethodTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\Types\Context
|
||||
* @uses \phpDocumentor\Reflection\Types\Void_
|
||||
*/
|
||||
public function testCreateWithoutReturnType()
|
||||
public function testCreateWithoutReturnType(): void
|
||||
{
|
||||
$descriptionFactory = m::mock(DescriptionFactory::class);
|
||||
$resolver = new TypeResolver();
|
||||
@@ -516,7 +516,7 @@ class MethodTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\Types\Integer
|
||||
* @uses \phpDocumentor\Reflection\Types\Object_
|
||||
*/
|
||||
public function testCreateWithMixedReturnTypes()
|
||||
public function testCreateWithMixedReturnTypes(): void
|
||||
{
|
||||
$descriptionFactory = m::mock(DescriptionFactory::class);
|
||||
$resolver = new TypeResolver();
|
||||
|
||||
@@ -30,7 +30,7 @@ class ParamTest extends TestCase
|
||||
/**
|
||||
* Call Mockery::close after each test.
|
||||
*/
|
||||
public function tearDown()
|
||||
public function tearDown(): void
|
||||
{
|
||||
m::close();
|
||||
}
|
||||
@@ -40,7 +40,7 @@ class ParamTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||
*/
|
||||
public function testIfCorrectTagNameIsReturned()
|
||||
public function testIfCorrectTagNameIsReturned(): void
|
||||
{
|
||||
$fixture = new Param('myParameter', null, false, new Description('Description'));
|
||||
|
||||
@@ -56,7 +56,7 @@ class ParamTest extends TestCase
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||
*/
|
||||
public function testIfTagCanBeRenderedUsingDefaultFormatter()
|
||||
public function testIfTagCanBeRenderedUsingDefaultFormatter(): void
|
||||
{
|
||||
$fixture = new Param('myParameter', new String_(), true, new Description('Description'));
|
||||
$this->assertSame('@param string ...$myParameter Description', $fixture->render());
|
||||
@@ -75,7 +75,7 @@ class ParamTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Param::__construct
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||
*/
|
||||
public function testIfTagCanBeRenderedUsingSpecificFormatter()
|
||||
public function testIfTagCanBeRenderedUsingSpecificFormatter(): void
|
||||
{
|
||||
$fixture = new Param('myParameter');
|
||||
|
||||
@@ -89,7 +89,7 @@ class ParamTest extends TestCase
|
||||
* @covers ::__construct
|
||||
* @covers ::getVariableName
|
||||
*/
|
||||
public function testHasVariableName()
|
||||
public function testHasVariableName(): void
|
||||
{
|
||||
$expected = 'myParameter';
|
||||
|
||||
@@ -102,7 +102,7 @@ class ParamTest extends TestCase
|
||||
* @covers ::__construct
|
||||
* @covers ::getType
|
||||
*/
|
||||
public function testHasType()
|
||||
public function testHasType(): void
|
||||
{
|
||||
$expected = new String_();
|
||||
|
||||
@@ -115,7 +115,7 @@ class ParamTest extends TestCase
|
||||
* @covers ::__construct
|
||||
* @covers ::isVariadic
|
||||
*/
|
||||
public function testIfParameterIsVariadic()
|
||||
public function testIfParameterIsVariadic(): void
|
||||
{
|
||||
$fixture = new Param('myParameter', new String_(), false);
|
||||
$this->assertFalse($fixture->isVariadic());
|
||||
@@ -129,7 +129,7 @@ class ParamTest extends TestCase
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getDescription
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
*/
|
||||
public function testHasDescription()
|
||||
public function testHasDescription(): void
|
||||
{
|
||||
$expected = new Description('Description');
|
||||
|
||||
@@ -145,7 +145,7 @@ class ParamTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
* @uses \phpDocumentor\Reflection\Types\String_
|
||||
*/
|
||||
public function testStringRepresentationIsReturned()
|
||||
public function testStringRepresentationIsReturned(): void
|
||||
{
|
||||
$fixture = new Param('myParameter', new String_(), true, new Description('Description'));
|
||||
|
||||
@@ -159,7 +159,7 @@ class ParamTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
* @uses \phpDocumentor\Reflection\Types\Context
|
||||
*/
|
||||
public function testFactoryMethod()
|
||||
public function testFactoryMethod(): void
|
||||
{
|
||||
$typeResolver = new TypeResolver();
|
||||
$descriptionFactory = m::mock(DescriptionFactory::class);
|
||||
@@ -184,7 +184,7 @@ class ParamTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
||||
* @expectedException \InvalidArgumentException
|
||||
*/
|
||||
public function testFactoryMethodFailsIfEmptyBodyIsGiven()
|
||||
public function testFactoryMethodFailsIfEmptyBodyIsGiven(): void
|
||||
{
|
||||
$descriptionFactory = m::mock(DescriptionFactory::class);
|
||||
Param::create('', new TypeResolver(), $descriptionFactory);
|
||||
@@ -194,7 +194,7 @@ class ParamTest extends TestCase
|
||||
* @covers ::create
|
||||
* @expectedException \InvalidArgumentException
|
||||
*/
|
||||
public function testFactoryMethodFailsIfResolverIsNull()
|
||||
public function testFactoryMethodFailsIfResolverIsNull(): void
|
||||
{
|
||||
Param::create('body');
|
||||
}
|
||||
@@ -204,7 +204,7 @@ class ParamTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\TypeResolver
|
||||
* @expectedException \InvalidArgumentException
|
||||
*/
|
||||
public function testFactoryMethodFailsIfDescriptionFactoryIsNull()
|
||||
public function testFactoryMethodFailsIfDescriptionFactoryIsNull(): void
|
||||
{
|
||||
Param::create('body', new TypeResolver());
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ class PropertyReadTest extends TestCase
|
||||
/**
|
||||
* Call Mockery::close after each test.
|
||||
*/
|
||||
public function tearDown()
|
||||
public function tearDown(): void
|
||||
{
|
||||
m::close();
|
||||
}
|
||||
@@ -40,7 +40,7 @@ class PropertyReadTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||
*/
|
||||
public function testIfCorrectTagNameIsReturned()
|
||||
public function testIfCorrectTagNameIsReturned(): void
|
||||
{
|
||||
$fixture = new PropertyRead('myProperty', null, new Description('Description'));
|
||||
|
||||
@@ -55,7 +55,7 @@ class PropertyReadTest extends TestCase
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||
*/
|
||||
public function testIfTagCanBeRenderedUsingDefaultFormatter()
|
||||
public function testIfTagCanBeRenderedUsingDefaultFormatter(): void
|
||||
{
|
||||
$fixture = new PropertyRead('myProperty', new String_(), new Description('Description'));
|
||||
$this->assertSame('@property-read string $myProperty Description', $fixture->render());
|
||||
@@ -71,7 +71,7 @@ class PropertyReadTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\PropertyRead::__construct
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||
*/
|
||||
public function testIfTagCanBeRenderedUsingSpecificFormatter()
|
||||
public function testIfTagCanBeRenderedUsingSpecificFormatter(): void
|
||||
{
|
||||
$fixture = new PropertyRead('myProperty');
|
||||
|
||||
@@ -85,7 +85,7 @@ class PropertyReadTest extends TestCase
|
||||
* @covers ::__construct
|
||||
* @covers ::getVariableName
|
||||
*/
|
||||
public function testHasVariableName()
|
||||
public function testHasVariableName(): void
|
||||
{
|
||||
$expected = 'myProperty';
|
||||
|
||||
@@ -98,7 +98,7 @@ class PropertyReadTest extends TestCase
|
||||
* @covers ::__construct
|
||||
* @covers ::getType
|
||||
*/
|
||||
public function testHasType()
|
||||
public function testHasType(): void
|
||||
{
|
||||
$expected = new String_();
|
||||
|
||||
@@ -112,7 +112,7 @@ class PropertyReadTest extends TestCase
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getDescription
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
*/
|
||||
public function testHasDescription()
|
||||
public function testHasDescription(): void
|
||||
{
|
||||
$expected = new Description('Description');
|
||||
|
||||
@@ -127,7 +127,7 @@ class PropertyReadTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
* @uses \phpDocumentor\Reflection\Types\String_
|
||||
*/
|
||||
public function testStringRepresentationIsReturned()
|
||||
public function testStringRepresentationIsReturned(): void
|
||||
{
|
||||
$fixture = new PropertyRead('myProperty', new String_(), new Description('Description'));
|
||||
|
||||
@@ -141,7 +141,7 @@ class PropertyReadTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
* @uses \phpDocumentor\Reflection\Types\Context
|
||||
*/
|
||||
public function testFactoryMethod()
|
||||
public function testFactoryMethod(): void
|
||||
{
|
||||
$typeResolver = new TypeResolver();
|
||||
$descriptionFactory = m::mock(DescriptionFactory::class);
|
||||
@@ -170,7 +170,7 @@ class PropertyReadTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
||||
* @expectedException \InvalidArgumentException
|
||||
*/
|
||||
public function testFactoryMethodFailsIfEmptyBodyIsGiven()
|
||||
public function testFactoryMethodFailsIfEmptyBodyIsGiven(): void
|
||||
{
|
||||
$descriptionFactory = m::mock(DescriptionFactory::class);
|
||||
PropertyRead::create('', new TypeResolver(), $descriptionFactory);
|
||||
@@ -180,7 +180,7 @@ class PropertyReadTest extends TestCase
|
||||
* @covers ::create
|
||||
* @expectedException \InvalidArgumentException
|
||||
*/
|
||||
public function testFactoryMethodFailsIfResolverIsNull()
|
||||
public function testFactoryMethodFailsIfResolverIsNull(): void
|
||||
{
|
||||
PropertyRead::create('body');
|
||||
}
|
||||
@@ -190,7 +190,7 @@ class PropertyReadTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\TypeResolver
|
||||
* @expectedException \InvalidArgumentException
|
||||
*/
|
||||
public function testFactoryMethodFailsIfDescriptionFactoryIsNull()
|
||||
public function testFactoryMethodFailsIfDescriptionFactoryIsNull(): void
|
||||
{
|
||||
PropertyRead::create('body', new TypeResolver());
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ class PropertyTest extends TestCase
|
||||
/**
|
||||
* Call Mockery::close after each test.
|
||||
*/
|
||||
public function tearDown()
|
||||
public function tearDown(): void
|
||||
{
|
||||
m::close();
|
||||
}
|
||||
@@ -40,7 +40,7 @@ class PropertyTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||
*/
|
||||
public function testIfCorrectTagNameIsReturned()
|
||||
public function testIfCorrectTagNameIsReturned(): void
|
||||
{
|
||||
$fixture = new Property('myProperty', null, new Description('Description'));
|
||||
|
||||
@@ -55,7 +55,7 @@ class PropertyTest extends TestCase
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||
*/
|
||||
public function testIfTagCanBeRenderedUsingDefaultFormatter()
|
||||
public function testIfTagCanBeRenderedUsingDefaultFormatter(): void
|
||||
{
|
||||
$fixture = new Property('myProperty', new String_(), new Description('Description'));
|
||||
$this->assertSame('@property string $myProperty Description', $fixture->render());
|
||||
@@ -71,7 +71,7 @@ class PropertyTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Property::__construct
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||
*/
|
||||
public function testIfTagCanBeRenderedUsingSpecificFormatter()
|
||||
public function testIfTagCanBeRenderedUsingSpecificFormatter(): void
|
||||
{
|
||||
$fixture = new Property('myProperty');
|
||||
|
||||
@@ -85,7 +85,7 @@ class PropertyTest extends TestCase
|
||||
* @covers ::__construct
|
||||
* @covers ::getVariableName
|
||||
*/
|
||||
public function testHasVariableName()
|
||||
public function testHasVariableName(): void
|
||||
{
|
||||
$expected = 'myProperty';
|
||||
|
||||
@@ -98,7 +98,7 @@ class PropertyTest extends TestCase
|
||||
* @covers ::__construct
|
||||
* @covers ::getType
|
||||
*/
|
||||
public function testHasType()
|
||||
public function testHasType(): void
|
||||
{
|
||||
$expected = new String_();
|
||||
|
||||
@@ -112,7 +112,7 @@ class PropertyTest extends TestCase
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getDescription
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
*/
|
||||
public function testHasDescription()
|
||||
public function testHasDescription(): void
|
||||
{
|
||||
$expected = new Description('Description');
|
||||
|
||||
@@ -127,7 +127,7 @@ class PropertyTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
* @uses \phpDocumentor\Reflection\Types\String_
|
||||
*/
|
||||
public function testStringRepresentationIsReturned()
|
||||
public function testStringRepresentationIsReturned(): void
|
||||
{
|
||||
$fixture = new Property('myProperty', new String_(), new Description('Description'));
|
||||
|
||||
@@ -141,7 +141,7 @@ class PropertyTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
* @uses \phpDocumentor\Reflection\Types\Context
|
||||
*/
|
||||
public function testFactoryMethod()
|
||||
public function testFactoryMethod(): void
|
||||
{
|
||||
$typeResolver = new TypeResolver();
|
||||
$descriptionFactory = m::mock(DescriptionFactory::class);
|
||||
@@ -165,7 +165,7 @@ class PropertyTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
||||
* @expectedException \InvalidArgumentException
|
||||
*/
|
||||
public function testFactoryMethodFailsIfEmptyBodyIsGiven()
|
||||
public function testFactoryMethodFailsIfEmptyBodyIsGiven(): void
|
||||
{
|
||||
$descriptionFactory = m::mock(DescriptionFactory::class);
|
||||
Property::create('', new TypeResolver(), $descriptionFactory);
|
||||
@@ -175,7 +175,7 @@ class PropertyTest extends TestCase
|
||||
* @covers ::create
|
||||
* @expectedException \InvalidArgumentException
|
||||
*/
|
||||
public function testFactoryMethodFailsIfResolverIsNull()
|
||||
public function testFactoryMethodFailsIfResolverIsNull(): void
|
||||
{
|
||||
Property::create('body');
|
||||
}
|
||||
@@ -185,7 +185,7 @@ class PropertyTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\TypeResolver
|
||||
* @expectedException \InvalidArgumentException
|
||||
*/
|
||||
public function testFactoryMethodFailsIfDescriptionFactoryIsNull()
|
||||
public function testFactoryMethodFailsIfDescriptionFactoryIsNull(): void
|
||||
{
|
||||
Property::create('body', new TypeResolver());
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ class PropertyWriteTest extends TestCase
|
||||
/**
|
||||
* Call Mockery::close after each test.
|
||||
*/
|
||||
public function tearDown()
|
||||
public function tearDown(): void
|
||||
{
|
||||
m::close();
|
||||
}
|
||||
@@ -40,7 +40,7 @@ class PropertyWriteTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||
*/
|
||||
public function testIfCorrectTagNameIsReturned()
|
||||
public function testIfCorrectTagNameIsReturned(): void
|
||||
{
|
||||
$fixture = new PropertyWrite('myProperty', null, new Description('Description'));
|
||||
|
||||
@@ -55,7 +55,7 @@ class PropertyWriteTest extends TestCase
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||
*/
|
||||
public function testIfTagCanBeRenderedUsingDefaultFormatter()
|
||||
public function testIfTagCanBeRenderedUsingDefaultFormatter(): void
|
||||
{
|
||||
$fixture = new PropertyWrite('myProperty', new String_(), new Description('Description'));
|
||||
$this->assertSame('@property-write string $myProperty Description', $fixture->render());
|
||||
@@ -71,7 +71,7 @@ class PropertyWriteTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\PropertyWrite::__construct
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||
*/
|
||||
public function testIfTagCanBeRenderedUsingSpecificFormatter()
|
||||
public function testIfTagCanBeRenderedUsingSpecificFormatter(): void
|
||||
{
|
||||
$fixture = new PropertyWrite('myProperty');
|
||||
|
||||
@@ -85,7 +85,7 @@ class PropertyWriteTest extends TestCase
|
||||
* @covers ::__construct
|
||||
* @covers ::getVariableName
|
||||
*/
|
||||
public function testHasVariableName()
|
||||
public function testHasVariableName(): void
|
||||
{
|
||||
$expected = 'myProperty';
|
||||
|
||||
@@ -98,7 +98,7 @@ class PropertyWriteTest extends TestCase
|
||||
* @covers ::__construct
|
||||
* @covers ::getType
|
||||
*/
|
||||
public function testHasType()
|
||||
public function testHasType(): void
|
||||
{
|
||||
$expected = new String_();
|
||||
|
||||
@@ -112,7 +112,7 @@ class PropertyWriteTest extends TestCase
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getDescription
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
*/
|
||||
public function testHasDescription()
|
||||
public function testHasDescription(): void
|
||||
{
|
||||
$expected = new Description('Description');
|
||||
|
||||
@@ -127,7 +127,7 @@ class PropertyWriteTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
* @uses \phpDocumentor\Reflection\Types\String_
|
||||
*/
|
||||
public function testStringRepresentationIsReturned()
|
||||
public function testStringRepresentationIsReturned(): void
|
||||
{
|
||||
$fixture = new PropertyWrite('myProperty', new String_(), new Description('Description'));
|
||||
|
||||
@@ -141,7 +141,7 @@ class PropertyWriteTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
* @uses \phpDocumentor\Reflection\Types\Context
|
||||
*/
|
||||
public function testFactoryMethod()
|
||||
public function testFactoryMethod(): void
|
||||
{
|
||||
$typeResolver = new TypeResolver();
|
||||
$descriptionFactory = m::mock(DescriptionFactory::class);
|
||||
@@ -170,7 +170,7 @@ class PropertyWriteTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
||||
* @expectedException \InvalidArgumentException
|
||||
*/
|
||||
public function testFactoryMethodFailsIfEmptyBodyIsGiven()
|
||||
public function testFactoryMethodFailsIfEmptyBodyIsGiven(): void
|
||||
{
|
||||
$descriptionFactory = m::mock(DescriptionFactory::class);
|
||||
PropertyWrite::create('', new TypeResolver(), $descriptionFactory);
|
||||
@@ -180,7 +180,7 @@ class PropertyWriteTest extends TestCase
|
||||
* @covers ::create
|
||||
* @expectedException \InvalidArgumentException
|
||||
*/
|
||||
public function testFactoryMethodFailsIfResolverIsNull()
|
||||
public function testFactoryMethodFailsIfResolverIsNull(): void
|
||||
{
|
||||
PropertyWrite::create('body');
|
||||
}
|
||||
@@ -190,7 +190,7 @@ class PropertyWriteTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\TypeResolver
|
||||
* @expectedException \InvalidArgumentException
|
||||
*/
|
||||
public function testFactoryMethodFailsIfDescriptionFactoryIsNull()
|
||||
public function testFactoryMethodFailsIfDescriptionFactoryIsNull(): void
|
||||
{
|
||||
PropertyWrite::create('body', new TypeResolver());
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ class ReturnTest extends TestCase
|
||||
/**
|
||||
* Call Mockery::close after each test.
|
||||
*/
|
||||
public function tearDown()
|
||||
public function tearDown(): void
|
||||
{
|
||||
m::close();
|
||||
}
|
||||
@@ -40,7 +40,7 @@ class ReturnTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||
*/
|
||||
public function testIfCorrectTagNameIsReturned()
|
||||
public function testIfCorrectTagNameIsReturned(): void
|
||||
{
|
||||
$fixture = new Return_(new String_(), new Description('Description'));
|
||||
|
||||
@@ -55,7 +55,7 @@ class ReturnTest extends TestCase
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||
*/
|
||||
public function testIfTagCanBeRenderedUsingDefaultFormatter()
|
||||
public function testIfTagCanBeRenderedUsingDefaultFormatter(): void
|
||||
{
|
||||
$fixture = new Return_(new String_(), new Description('Description'));
|
||||
|
||||
@@ -67,7 +67,7 @@ class ReturnTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||
*/
|
||||
public function testIfTagCanBeRenderedUsingSpecificFormatter()
|
||||
public function testIfTagCanBeRenderedUsingSpecificFormatter(): void
|
||||
{
|
||||
$fixture = new Return_(new String_(), new Description('Description'));
|
||||
|
||||
@@ -81,7 +81,7 @@ class ReturnTest extends TestCase
|
||||
* @covers ::__construct
|
||||
* @covers ::getType
|
||||
*/
|
||||
public function testHasType()
|
||||
public function testHasType(): void
|
||||
{
|
||||
$expected = new String_();
|
||||
|
||||
@@ -95,7 +95,7 @@ class ReturnTest extends TestCase
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getDescription
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
*/
|
||||
public function testHasDescription()
|
||||
public function testHasDescription(): void
|
||||
{
|
||||
$expected = new Description('Description');
|
||||
|
||||
@@ -109,7 +109,7 @@ class ReturnTest extends TestCase
|
||||
* @covers ::__toString
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
*/
|
||||
public function testStringRepresentationIsReturned()
|
||||
public function testStringRepresentationIsReturned(): void
|
||||
{
|
||||
$fixture = new Return_(new String_(), new Description('Description'));
|
||||
|
||||
@@ -125,7 +125,7 @@ class ReturnTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\Types\String_
|
||||
* @uses \phpDocumentor\Reflection\Types\Context
|
||||
*/
|
||||
public function testFactoryMethod()
|
||||
public function testFactoryMethod(): void
|
||||
{
|
||||
$descriptionFactory = m::mock(DescriptionFactory::class);
|
||||
$resolver = new TypeResolver();
|
||||
@@ -146,7 +146,7 @@ class ReturnTest extends TestCase
|
||||
* @covers ::create
|
||||
* @expectedException \InvalidArgumentException
|
||||
*/
|
||||
public function testFactoryMethodFailsIfBodyIsNotEmpty()
|
||||
public function testFactoryMethodFailsIfBodyIsNotEmpty(): void
|
||||
{
|
||||
$this->assertNull(Return_::create(''));
|
||||
}
|
||||
@@ -155,7 +155,7 @@ class ReturnTest extends TestCase
|
||||
* @covers ::create
|
||||
* @expectedException \InvalidArgumentException
|
||||
*/
|
||||
public function testFactoryMethodFailsIfResolverIsNull()
|
||||
public function testFactoryMethodFailsIfResolverIsNull(): void
|
||||
{
|
||||
Return_::create('body');
|
||||
}
|
||||
@@ -164,7 +164,7 @@ class ReturnTest extends TestCase
|
||||
* @covers ::create
|
||||
* @expectedException \InvalidArgumentException
|
||||
*/
|
||||
public function testFactoryMethodFailsIfDescriptionFactoryIsNull()
|
||||
public function testFactoryMethodFailsIfDescriptionFactoryIsNull(): void
|
||||
{
|
||||
Return_::create('body', new TypeResolver());
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ class SeeTest extends TestCase
|
||||
/**
|
||||
* Call Mockery::close after each test.
|
||||
*/
|
||||
public function tearDown()
|
||||
public function tearDown(): void
|
||||
{
|
||||
m::close();
|
||||
}
|
||||
@@ -44,7 +44,7 @@ class SeeTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\Fqsen
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||
*/
|
||||
public function testIfCorrectTagNameIsReturned()
|
||||
public function testIfCorrectTagNameIsReturned(): void
|
||||
{
|
||||
$fixture = new See(new FqsenRef(new Fqsen('\DateTime')), new Description('Description'));
|
||||
|
||||
@@ -60,7 +60,7 @@ class SeeTest extends TestCase
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||
*/
|
||||
public function testIfTagCanBeRenderedUsingDefaultFormatter()
|
||||
public function testIfTagCanBeRenderedUsingDefaultFormatter(): void
|
||||
{
|
||||
$fixture = new See(new FqsenRef(new Fqsen('\DateTime')), new Description('Description'));
|
||||
|
||||
@@ -74,7 +74,7 @@ class SeeTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\Fqsen
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||
*/
|
||||
public function testIfTagCanBeRenderedUsingSpecificFormatter()
|
||||
public function testIfTagCanBeRenderedUsingSpecificFormatter(): void
|
||||
{
|
||||
$fixture = new See(new FqsenRef(new Fqsen('\DateTime')), new Description('Description'));
|
||||
|
||||
@@ -90,7 +90,7 @@ class SeeTest extends TestCase
|
||||
* @covers ::__construct
|
||||
* @covers ::getReference
|
||||
*/
|
||||
public function testHasReferenceToFqsen()
|
||||
public function testHasReferenceToFqsen(): void
|
||||
{
|
||||
$expected = new FqsenRef(new Fqsen('\DateTime'));
|
||||
|
||||
@@ -106,7 +106,7 @@ class SeeTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Reference\Fqsen
|
||||
* @uses \phpDocumentor\Reflection\Fqsen
|
||||
*/
|
||||
public function testHasDescription()
|
||||
public function testHasDescription(): void
|
||||
{
|
||||
$expected = new Description('Description');
|
||||
|
||||
@@ -122,7 +122,7 @@ class SeeTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Reference\Fqsen
|
||||
* @uses \phpDocumentor\Reflection\Fqsen
|
||||
*/
|
||||
public function testStringRepresentationIsReturned()
|
||||
public function testStringRepresentationIsReturned(): void
|
||||
{
|
||||
$fixture = new See(new FqsenRef(new Fqsen('\DateTime::format()')), new Description('Description'));
|
||||
|
||||
@@ -139,7 +139,7 @@ class SeeTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\Fqsen
|
||||
* @uses \phpDocumentor\Reflection\Types\Context
|
||||
*/
|
||||
public function testFactoryMethod()
|
||||
public function testFactoryMethod(): void
|
||||
{
|
||||
$descriptionFactory = m::mock(DescriptionFactory::class);
|
||||
$resolver = m::mock(FqsenResolver::class);
|
||||
@@ -169,7 +169,7 @@ class SeeTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Reference\Url
|
||||
* @uses \phpDocumentor\Reflection\Types\Context
|
||||
*/
|
||||
public function testFactoryMethodWithUrl()
|
||||
public function testFactoryMethodWithUrl(): void
|
||||
{
|
||||
$descriptionFactory = m::mock(DescriptionFactory::class);
|
||||
$resolver = m::mock(FqsenResolver::class);
|
||||
@@ -194,7 +194,7 @@ class SeeTest extends TestCase
|
||||
* @covers ::create
|
||||
* @expectedException \InvalidArgumentException
|
||||
*/
|
||||
public function testFactoryMethodFailsIfBodyIsNotEmpty()
|
||||
public function testFactoryMethodFailsIfBodyIsNotEmpty(): void
|
||||
{
|
||||
$this->assertNull(See::create(''));
|
||||
}
|
||||
@@ -203,7 +203,7 @@ class SeeTest extends TestCase
|
||||
* @covers ::create
|
||||
* @expectedException \InvalidArgumentException
|
||||
*/
|
||||
public function testFactoryMethodFailsIfResolverIsNull()
|
||||
public function testFactoryMethodFailsIfResolverIsNull(): void
|
||||
{
|
||||
See::create('body');
|
||||
}
|
||||
@@ -212,7 +212,7 @@ class SeeTest extends TestCase
|
||||
* @covers ::create
|
||||
* @expectedException \InvalidArgumentException
|
||||
*/
|
||||
public function testFactoryMethodFailsIfDescriptionFactoryIsNull()
|
||||
public function testFactoryMethodFailsIfDescriptionFactoryIsNull(): void
|
||||
{
|
||||
See::create('body', new FqsenResolver());
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ class SinceTest extends TestCase
|
||||
/**
|
||||
* Call Mockery::close after each test.
|
||||
*/
|
||||
public function tearDown()
|
||||
public function tearDown(): void
|
||||
{
|
||||
m::close();
|
||||
}
|
||||
@@ -39,7 +39,7 @@ class SinceTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||
*/
|
||||
public function testIfCorrectTagNameIsReturned()
|
||||
public function testIfCorrectTagNameIsReturned(): void
|
||||
{
|
||||
$fixture = new Since('1.0', new Description('Description'));
|
||||
|
||||
@@ -54,7 +54,7 @@ class SinceTest extends TestCase
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||
*/
|
||||
public function testIfTagCanBeRenderedUsingDefaultFormatter()
|
||||
public function testIfTagCanBeRenderedUsingDefaultFormatter(): void
|
||||
{
|
||||
$fixture = new Since('1.0', new Description('Description'));
|
||||
|
||||
@@ -66,7 +66,7 @@ class SinceTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||
*/
|
||||
public function testIfTagCanBeRenderedUsingSpecificFormatter()
|
||||
public function testIfTagCanBeRenderedUsingSpecificFormatter(): void
|
||||
{
|
||||
$fixture = new Since('1.0', new Description('Description'));
|
||||
|
||||
@@ -80,7 +80,7 @@ class SinceTest extends TestCase
|
||||
* @covers ::__construct
|
||||
* @covers ::getVersion
|
||||
*/
|
||||
public function testHasVersionNumber()
|
||||
public function testHasVersionNumber(): void
|
||||
{
|
||||
$expected = '1.0';
|
||||
|
||||
@@ -94,7 +94,7 @@ class SinceTest extends TestCase
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getDescription
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
*/
|
||||
public function testHasDescription()
|
||||
public function testHasDescription(): void
|
||||
{
|
||||
$expected = new Description('Description');
|
||||
|
||||
@@ -108,7 +108,7 @@ class SinceTest extends TestCase
|
||||
* @covers ::__toString
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
*/
|
||||
public function testStringRepresentationIsReturned()
|
||||
public function testStringRepresentationIsReturned(): void
|
||||
{
|
||||
$fixture = new Since('1.0', new Description('Description'));
|
||||
|
||||
@@ -122,7 +122,7 @@ class SinceTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
* @uses \phpDocumentor\Reflection\Types\Context
|
||||
*/
|
||||
public function testFactoryMethod()
|
||||
public function testFactoryMethod(): void
|
||||
{
|
||||
$descriptionFactory = m::mock(DescriptionFactory::class);
|
||||
$context = new Context('');
|
||||
@@ -146,7 +146,7 @@ class SinceTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
* @uses \phpDocumentor\Reflection\Types\Context
|
||||
*/
|
||||
public function testFactoryMethodCreatesEmptySinceTag()
|
||||
public function testFactoryMethodCreatesEmptySinceTag(): void
|
||||
{
|
||||
$descriptionFactory = m::mock(DescriptionFactory::class);
|
||||
$descriptionFactory->shouldReceive('create')->never();
|
||||
@@ -161,7 +161,7 @@ class SinceTest extends TestCase
|
||||
/**
|
||||
* @covers ::create
|
||||
*/
|
||||
public function testFactoryMethodReturnsNullIfBodyDoesNotMatchRegex()
|
||||
public function testFactoryMethodReturnsNullIfBodyDoesNotMatchRegex(): void
|
||||
{
|
||||
$this->assertNull(Since::create('dkhf<'));
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ class SourceTest extends TestCase
|
||||
/**
|
||||
* Call Mockery::close after each test.
|
||||
*/
|
||||
public function tearDown()
|
||||
public function tearDown(): void
|
||||
{
|
||||
m::close();
|
||||
}
|
||||
@@ -38,7 +38,7 @@ class SourceTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||
*/
|
||||
public function testIfCorrectTagNameIsReturned()
|
||||
public function testIfCorrectTagNameIsReturned(): void
|
||||
{
|
||||
$fixture = new Source(1, null, new Description('Description'));
|
||||
|
||||
@@ -53,7 +53,7 @@ class SourceTest extends TestCase
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||
*/
|
||||
public function testIfTagCanBeRenderedUsingDefaultFormatter()
|
||||
public function testIfTagCanBeRenderedUsingDefaultFormatter(): void
|
||||
{
|
||||
$fixture = new Source(1, 10, new Description('Description'));
|
||||
$this->assertSame('@source 1 10 Description', $fixture->render());
|
||||
@@ -69,7 +69,7 @@ class SourceTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Source::__construct
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||
*/
|
||||
public function testIfTagCanBeRenderedUsingSpecificFormatter()
|
||||
public function testIfTagCanBeRenderedUsingSpecificFormatter(): void
|
||||
{
|
||||
$fixture = new Source(1);
|
||||
|
||||
@@ -83,7 +83,7 @@ class SourceTest extends TestCase
|
||||
* @covers ::__construct
|
||||
* @covers ::getStartingLine
|
||||
*/
|
||||
public function testHasStartingLine()
|
||||
public function testHasStartingLine(): void
|
||||
{
|
||||
$expected = 1;
|
||||
|
||||
@@ -96,7 +96,7 @@ class SourceTest extends TestCase
|
||||
* @covers ::__construct
|
||||
* @covers ::getLineCount
|
||||
*/
|
||||
public function testHasLineCount()
|
||||
public function testHasLineCount(): void
|
||||
{
|
||||
$expected = 2;
|
||||
|
||||
@@ -110,7 +110,7 @@ class SourceTest extends TestCase
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getDescription
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
*/
|
||||
public function testHasDescription()
|
||||
public function testHasDescription(): void
|
||||
{
|
||||
$expected = new Description('Description');
|
||||
|
||||
@@ -125,7 +125,7 @@ class SourceTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
* @uses \phpDocumentor\Reflection\Types\String_
|
||||
*/
|
||||
public function testStringRepresentationIsReturned()
|
||||
public function testStringRepresentationIsReturned(): void
|
||||
{
|
||||
$fixture = new Source(1, 10, new Description('Description'));
|
||||
|
||||
@@ -139,7 +139,7 @@ class SourceTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
* @uses \phpDocumentor\Reflection\Types\Context
|
||||
*/
|
||||
public function testFactoryMethod()
|
||||
public function testFactoryMethod(): void
|
||||
{
|
||||
$descriptionFactory = m::mock(DescriptionFactory::class);
|
||||
$context = new Context('');
|
||||
@@ -162,7 +162,7 @@ class SourceTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
||||
* @expectedException \InvalidArgumentException
|
||||
*/
|
||||
public function testFactoryMethodFailsIfEmptyBodyIsGiven()
|
||||
public function testFactoryMethodFailsIfEmptyBodyIsGiven(): void
|
||||
{
|
||||
$descriptionFactory = m::mock(DescriptionFactory::class);
|
||||
Source::create('', $descriptionFactory);
|
||||
@@ -173,7 +173,7 @@ class SourceTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\TypeResolver
|
||||
* @expectedException \InvalidArgumentException
|
||||
*/
|
||||
public function testFactoryMethodFailsIfDescriptionFactoryIsNull()
|
||||
public function testFactoryMethodFailsIfDescriptionFactoryIsNull(): void
|
||||
{
|
||||
Source::create('1');
|
||||
}
|
||||
@@ -182,7 +182,7 @@ class SourceTest extends TestCase
|
||||
* @covers ::__construct
|
||||
* @expectedException \InvalidArgumentException
|
||||
*/
|
||||
public function testExceptionIsThrownIfStartingLineIsNotInteger()
|
||||
public function testExceptionIsThrownIfStartingLineIsNotInteger(): void
|
||||
{
|
||||
new Source('blabla');
|
||||
}
|
||||
@@ -191,7 +191,7 @@ class SourceTest extends TestCase
|
||||
* @covers ::__construct
|
||||
* @expectedException \InvalidArgumentException
|
||||
*/
|
||||
public function testExceptionIsThrownIfLineCountIsNotIntegerOrNull()
|
||||
public function testExceptionIsThrownIfLineCountIsNotIntegerOrNull(): void
|
||||
{
|
||||
new Source('1', []);
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ class ThrowsTest extends TestCase
|
||||
/**
|
||||
* Call Mockery::close after each test.
|
||||
*/
|
||||
public function tearDown()
|
||||
public function tearDown(): void
|
||||
{
|
||||
m::close();
|
||||
}
|
||||
@@ -40,7 +40,7 @@ class ThrowsTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||
*/
|
||||
public function testIfCorrectTagNameIsReturned()
|
||||
public function testIfCorrectTagNameIsReturned(): void
|
||||
{
|
||||
$fixture = new Throws(new String_(), new Description('Description'));
|
||||
|
||||
@@ -55,7 +55,7 @@ class ThrowsTest extends TestCase
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||
*/
|
||||
public function testIfTagCanBeRenderedUsingDefaultFormatter()
|
||||
public function testIfTagCanBeRenderedUsingDefaultFormatter(): void
|
||||
{
|
||||
$fixture = new Throws(new String_(), new Description('Description'));
|
||||
|
||||
@@ -67,7 +67,7 @@ class ThrowsTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||
*/
|
||||
public function testIfTagCanBeRenderedUsingSpecificFormatter()
|
||||
public function testIfTagCanBeRenderedUsingSpecificFormatter(): void
|
||||
{
|
||||
$fixture = new Throws(new String_(), new Description('Description'));
|
||||
|
||||
@@ -81,7 +81,7 @@ class ThrowsTest extends TestCase
|
||||
* @covers ::__construct
|
||||
* @covers ::getType
|
||||
*/
|
||||
public function testHasType()
|
||||
public function testHasType(): void
|
||||
{
|
||||
$expected = new String_();
|
||||
|
||||
@@ -95,7 +95,7 @@ class ThrowsTest extends TestCase
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getDescription
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
*/
|
||||
public function testHasDescription()
|
||||
public function testHasDescription(): void
|
||||
{
|
||||
$expected = new Description('Description');
|
||||
|
||||
@@ -109,7 +109,7 @@ class ThrowsTest extends TestCase
|
||||
* @covers ::__toString
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
*/
|
||||
public function testStringRepresentationIsReturned()
|
||||
public function testStringRepresentationIsReturned(): void
|
||||
{
|
||||
$fixture = new Throws(new String_(), new Description('Description'));
|
||||
|
||||
@@ -125,7 +125,7 @@ class ThrowsTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\Types\String_
|
||||
* @uses \phpDocumentor\Reflection\Types\Context
|
||||
*/
|
||||
public function testFactoryMethod()
|
||||
public function testFactoryMethod(): void
|
||||
{
|
||||
$descriptionFactory = m::mock(DescriptionFactory::class);
|
||||
$resolver = new TypeResolver();
|
||||
@@ -146,7 +146,7 @@ class ThrowsTest extends TestCase
|
||||
* @covers ::create
|
||||
* @expectedException \InvalidArgumentException
|
||||
*/
|
||||
public function testFactoryMethodFailsIfBodyIsNotEmpty()
|
||||
public function testFactoryMethodFailsIfBodyIsNotEmpty(): void
|
||||
{
|
||||
$this->assertNull(Throws::create(''));
|
||||
}
|
||||
@@ -155,7 +155,7 @@ class ThrowsTest extends TestCase
|
||||
* @covers ::create
|
||||
* @expectedException \InvalidArgumentException
|
||||
*/
|
||||
public function testFactoryMethodFailsIfResolverIsNull()
|
||||
public function testFactoryMethodFailsIfResolverIsNull(): void
|
||||
{
|
||||
Throws::create('body');
|
||||
}
|
||||
@@ -164,7 +164,7 @@ class ThrowsTest extends TestCase
|
||||
* @covers ::create
|
||||
* @expectedException \InvalidArgumentException
|
||||
*/
|
||||
public function testFactoryMethodFailsIfDescriptionFactoryIsNull()
|
||||
public function testFactoryMethodFailsIfDescriptionFactoryIsNull(): void
|
||||
{
|
||||
Throws::create('body', new TypeResolver());
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ class UsesTest extends TestCase
|
||||
/**
|
||||
* Call Mockery::close after each test.
|
||||
*/
|
||||
public function tearDown()
|
||||
public function tearDown(): void
|
||||
{
|
||||
m::close();
|
||||
}
|
||||
@@ -40,7 +40,7 @@ class UsesTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||
*/
|
||||
public function testIfCorrectTagNameIsReturned()
|
||||
public function testIfCorrectTagNameIsReturned(): void
|
||||
{
|
||||
$fixture = new Uses(new Fqsen('\DateTime'), new Description('Description'));
|
||||
|
||||
@@ -55,7 +55,7 @@ class UsesTest extends TestCase
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||
*/
|
||||
public function testIfTagCanBeRenderedUsingDefaultFormatter()
|
||||
public function testIfTagCanBeRenderedUsingDefaultFormatter(): void
|
||||
{
|
||||
$fixture = new Uses(new Fqsen('\DateTime'), new Description('Description'));
|
||||
|
||||
@@ -67,7 +67,7 @@ class UsesTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||
*/
|
||||
public function testIfTagCanBeRenderedUsingSpecificFormatter()
|
||||
public function testIfTagCanBeRenderedUsingSpecificFormatter(): void
|
||||
{
|
||||
$fixture = new Uses(new Fqsen('\DateTime'), new Description('Description'));
|
||||
|
||||
@@ -81,7 +81,7 @@ class UsesTest extends TestCase
|
||||
* @covers ::__construct
|
||||
* @covers ::getReference
|
||||
*/
|
||||
public function testHasReferenceToFqsen()
|
||||
public function testHasReferenceToFqsen(): void
|
||||
{
|
||||
$expected = new Fqsen('\DateTime');
|
||||
|
||||
@@ -95,7 +95,7 @@ class UsesTest extends TestCase
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getDescription
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
*/
|
||||
public function testHasDescription()
|
||||
public function testHasDescription(): void
|
||||
{
|
||||
$expected = new Description('Description');
|
||||
|
||||
@@ -109,7 +109,7 @@ class UsesTest extends TestCase
|
||||
* @covers ::__toString
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
*/
|
||||
public function testStringRepresentationIsReturned()
|
||||
public function testStringRepresentationIsReturned(): void
|
||||
{
|
||||
$fixture = new Uses(new Fqsen('\DateTime'), new Description('Description'));
|
||||
|
||||
@@ -125,7 +125,7 @@ class UsesTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\Fqsen
|
||||
* @uses \phpDocumentor\Reflection\Types\Context
|
||||
*/
|
||||
public function testFactoryMethod()
|
||||
public function testFactoryMethod(): void
|
||||
{
|
||||
$descriptionFactory = m::mock(DescriptionFactory::class);
|
||||
$resolver = m::mock(FqsenResolver::class);
|
||||
@@ -149,7 +149,7 @@ class UsesTest extends TestCase
|
||||
* @covers ::create
|
||||
* @expectedException \InvalidArgumentException
|
||||
*/
|
||||
public function testFactoryMethodFailsIfBodyIsNotEmpty()
|
||||
public function testFactoryMethodFailsIfBodyIsNotEmpty(): void
|
||||
{
|
||||
$this->assertNull(Uses::create(''));
|
||||
}
|
||||
@@ -158,7 +158,7 @@ class UsesTest extends TestCase
|
||||
* @covers ::create
|
||||
* @expectedException \InvalidArgumentException
|
||||
*/
|
||||
public function testFactoryMethodFailsIfResolverIsNull()
|
||||
public function testFactoryMethodFailsIfResolverIsNull(): void
|
||||
{
|
||||
Uses::create('body');
|
||||
}
|
||||
@@ -167,7 +167,7 @@ class UsesTest extends TestCase
|
||||
* @covers ::create
|
||||
* @expectedException \InvalidArgumentException
|
||||
*/
|
||||
public function testFactoryMethodFailsIfDescriptionFactoryIsNull()
|
||||
public function testFactoryMethodFailsIfDescriptionFactoryIsNull(): void
|
||||
{
|
||||
Uses::create('body', new FqsenResolver());
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ class VarTest extends TestCase
|
||||
/**
|
||||
* Call Mockery::close after each test.
|
||||
*/
|
||||
public function tearDown()
|
||||
public function tearDown(): void
|
||||
{
|
||||
m::close();
|
||||
}
|
||||
@@ -40,7 +40,7 @@ class VarTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||
*/
|
||||
public function testIfCorrectTagNameIsReturned()
|
||||
public function testIfCorrectTagNameIsReturned(): void
|
||||
{
|
||||
$fixture = new Var_('myVariable', null, new Description('Description'));
|
||||
|
||||
@@ -51,7 +51,7 @@ class VarTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Var_::__construct
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||
*/
|
||||
public function testIfVariableNameIsOmmitedIfEmpty()
|
||||
public function testIfVariableNameIsOmmitedIfEmpty(): void
|
||||
{
|
||||
$fixture = new Var_('', null, null);
|
||||
|
||||
@@ -66,7 +66,7 @@ class VarTest extends TestCase
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||
*/
|
||||
public function testIfTagCanBeRenderedUsingDefaultFormatter()
|
||||
public function testIfTagCanBeRenderedUsingDefaultFormatter(): void
|
||||
{
|
||||
$fixture = new Var_('myVariable', new String_(), new Description('Description'));
|
||||
$this->assertSame('@var string $myVariable Description', $fixture->render());
|
||||
@@ -82,7 +82,7 @@ class VarTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Var_::__construct
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||
*/
|
||||
public function testIfTagCanBeRenderedUsingSpecificFormatter()
|
||||
public function testIfTagCanBeRenderedUsingSpecificFormatter(): void
|
||||
{
|
||||
$fixture = new Var_('myVariable');
|
||||
|
||||
@@ -96,7 +96,7 @@ class VarTest extends TestCase
|
||||
* @covers ::__construct
|
||||
* @covers ::getVariableName
|
||||
*/
|
||||
public function testHasVariableName()
|
||||
public function testHasVariableName(): void
|
||||
{
|
||||
$expected = 'myVariable';
|
||||
|
||||
@@ -109,7 +109,7 @@ class VarTest extends TestCase
|
||||
* @covers ::__construct
|
||||
* @covers ::getType
|
||||
*/
|
||||
public function testHasType()
|
||||
public function testHasType(): void
|
||||
{
|
||||
$expected = new String_();
|
||||
|
||||
@@ -123,7 +123,7 @@ class VarTest extends TestCase
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getDescription
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
*/
|
||||
public function testHasDescription()
|
||||
public function testHasDescription(): void
|
||||
{
|
||||
$expected = new Description('Description');
|
||||
|
||||
@@ -138,7 +138,7 @@ class VarTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
* @uses \phpDocumentor\Reflection\Types\String_
|
||||
*/
|
||||
public function testStringRepresentationIsReturned()
|
||||
public function testStringRepresentationIsReturned(): void
|
||||
{
|
||||
$fixture = new Var_('myVariable', new String_(), new Description('Description'));
|
||||
|
||||
@@ -152,7 +152,7 @@ class VarTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
* @uses \phpDocumentor\Reflection\Types\Context
|
||||
*/
|
||||
public function testFactoryMethod()
|
||||
public function testFactoryMethod(): void
|
||||
{
|
||||
$typeResolver = new TypeResolver();
|
||||
$descriptionFactory = m::mock(DescriptionFactory::class);
|
||||
@@ -176,7 +176,7 @@ class VarTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
||||
* @expectedException \InvalidArgumentException
|
||||
*/
|
||||
public function testFactoryMethodFailsIfEmptyBodyIsGiven()
|
||||
public function testFactoryMethodFailsIfEmptyBodyIsGiven(): void
|
||||
{
|
||||
$descriptionFactory = m::mock(DescriptionFactory::class);
|
||||
Var_::create('', new TypeResolver(), $descriptionFactory);
|
||||
@@ -186,7 +186,7 @@ class VarTest extends TestCase
|
||||
* @covers ::create
|
||||
* @expectedException \InvalidArgumentException
|
||||
*/
|
||||
public function testFactoryMethodFailsIfResolverIsNull()
|
||||
public function testFactoryMethodFailsIfResolverIsNull(): void
|
||||
{
|
||||
Var_::create('body');
|
||||
}
|
||||
@@ -196,7 +196,7 @@ class VarTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\TypeResolver
|
||||
* @expectedException \InvalidArgumentException
|
||||
*/
|
||||
public function testFactoryMethodFailsIfDescriptionFactoryIsNull()
|
||||
public function testFactoryMethodFailsIfDescriptionFactoryIsNull(): void
|
||||
{
|
||||
Var_::create('body', new TypeResolver());
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ class VersionTest extends TestCase
|
||||
/**
|
||||
* Call Mockery::close after each test.
|
||||
*/
|
||||
public function tearDown()
|
||||
public function tearDown(): void
|
||||
{
|
||||
m::close();
|
||||
}
|
||||
@@ -38,7 +38,7 @@ class VersionTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||
*/
|
||||
public function testIfCorrectTagNameIsReturned()
|
||||
public function testIfCorrectTagNameIsReturned(): void
|
||||
{
|
||||
$fixture = new Version('1.0', new Description('Description'));
|
||||
|
||||
@@ -53,7 +53,7 @@ class VersionTest extends TestCase
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||
*/
|
||||
public function testIfTagCanBeRenderedUsingDefaultFormatter()
|
||||
public function testIfTagCanBeRenderedUsingDefaultFormatter(): void
|
||||
{
|
||||
$fixture = new Version('1.0', new Description('Description'));
|
||||
|
||||
@@ -65,7 +65,7 @@ class VersionTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||
*/
|
||||
public function testIfTagCanBeRenderedUsingSpecificFormatter()
|
||||
public function testIfTagCanBeRenderedUsingSpecificFormatter(): void
|
||||
{
|
||||
$fixture = new Version('1.0', new Description('Description'));
|
||||
|
||||
@@ -79,7 +79,7 @@ class VersionTest extends TestCase
|
||||
* @covers ::__construct
|
||||
* @covers ::getVersion
|
||||
*/
|
||||
public function testHasVersionNumber()
|
||||
public function testHasVersionNumber(): void
|
||||
{
|
||||
$expected = '1.0';
|
||||
|
||||
@@ -93,7 +93,7 @@ class VersionTest extends TestCase
|
||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getDescription
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
*/
|
||||
public function testHasDescription()
|
||||
public function testHasDescription(): void
|
||||
{
|
||||
$expected = new Description('Description');
|
||||
|
||||
@@ -107,7 +107,7 @@ class VersionTest extends TestCase
|
||||
* @covers ::__toString
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
*/
|
||||
public function testStringRepresentationIsReturned()
|
||||
public function testStringRepresentationIsReturned(): void
|
||||
{
|
||||
$fixture = new Version('1.0', new Description('Description'));
|
||||
|
||||
@@ -121,7 +121,7 @@ class VersionTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
* @uses \phpDocumentor\Reflection\Types\Context
|
||||
*/
|
||||
public function testFactoryMethod()
|
||||
public function testFactoryMethod(): void
|
||||
{
|
||||
$descriptionFactory = m::mock(DescriptionFactory::class);
|
||||
$context = new Context('');
|
||||
@@ -145,7 +145,7 @@ class VersionTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
* @uses \phpDocumentor\Reflection\Types\Context
|
||||
*/
|
||||
public function testFactoryMethodCreatesEmptyVersionTag()
|
||||
public function testFactoryMethodCreatesEmptyVersionTag(): void
|
||||
{
|
||||
$descriptionFactory = m::mock(DescriptionFactory::class);
|
||||
$descriptionFactory->shouldReceive('create')->never();
|
||||
@@ -160,7 +160,7 @@ class VersionTest extends TestCase
|
||||
/**
|
||||
* @covers ::create
|
||||
*/
|
||||
public function testFactoryMethodReturnsNullIfBodyDoesNotMatchRegex()
|
||||
public function testFactoryMethodReturnsNullIfBodyDoesNotMatchRegex(): void
|
||||
{
|
||||
$this->assertNull(Version::create('dkhf<'));
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ class DocBlockFactoryTest extends TestCase
|
||||
/**
|
||||
* Call Mockery::close after each test.
|
||||
*/
|
||||
public function tearDown()
|
||||
public function tearDown(): void
|
||||
{
|
||||
m::close();
|
||||
}
|
||||
@@ -44,7 +44,7 @@ class DocBlockFactoryTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\StandardTagFactory
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
||||
*/
|
||||
public function testCreateFactoryUsingFactoryMethod()
|
||||
public function testCreateFactoryUsingFactoryMethod(): void
|
||||
{
|
||||
$fixture = DocBlockFactory::createInstance();
|
||||
|
||||
@@ -56,7 +56,7 @@ class DocBlockFactoryTest extends TestCase
|
||||
* @covers ::create
|
||||
* @uses phpDocumentor\Reflection\DocBlock\Description
|
||||
*/
|
||||
public function testCreateDocBlockFromReflection()
|
||||
public function testCreateDocBlockFromReflection(): void
|
||||
{
|
||||
$fixture = new DocBlockFactory(m::mock(DescriptionFactory::class), m::mock(TagFactory::class));
|
||||
|
||||
@@ -78,7 +78,7 @@ class DocBlockFactoryTest extends TestCase
|
||||
* @covers ::create
|
||||
* @uses phpDocumentor\Reflection\DocBlock\Description
|
||||
*/
|
||||
public function testCreateDocBlockFromStringWithDocComment()
|
||||
public function testCreateDocBlockFromStringWithDocComment(): void
|
||||
{
|
||||
$fixture = new DocBlockFactory(m::mock(DescriptionFactory::class), m::mock(TagFactory::class));
|
||||
|
||||
@@ -97,7 +97,7 @@ class DocBlockFactoryTest extends TestCase
|
||||
* @covers ::__construct
|
||||
* @uses phpDocumentor\Reflection\DocBlock\Description
|
||||
*/
|
||||
public function testCreateDocBlockFromStringWithoutDocComment()
|
||||
public function testCreateDocBlockFromStringWithoutDocComment(): void
|
||||
{
|
||||
$fixture = new DocBlockFactory(m::mock(DescriptionFactory::class), m::mock(TagFactory::class));
|
||||
|
||||
@@ -118,7 +118,7 @@ class DocBlockFactoryTest extends TestCase
|
||||
* @uses phpDocumentor\Reflection\DocBlock\Description
|
||||
* @dataProvider provideSummaryAndDescriptions
|
||||
*/
|
||||
public function testSummaryAndDescriptionAreSeparated($given, $summary, $description)
|
||||
public function testSummaryAndDescriptionAreSeparated($given, $summary, $description): void
|
||||
{
|
||||
$tagFactory = m::mock(TagFactory::class);
|
||||
$fixture = new DocBlockFactory(new DescriptionFactory($tagFactory), $tagFactory);
|
||||
@@ -135,7 +135,7 @@ class DocBlockFactoryTest extends TestCase
|
||||
* @uses phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
||||
* @uses phpDocumentor\Reflection\DocBlock\Description
|
||||
*/
|
||||
public function testDescriptionsRetainFormatting()
|
||||
public function testDescriptionsRetainFormatting(): void
|
||||
{
|
||||
$tagFactory = m::mock(TagFactory::class);
|
||||
$fixture = new DocBlockFactory(new DescriptionFactory($tagFactory), $tagFactory);
|
||||
@@ -168,7 +168,7 @@ DESCRIPTION;
|
||||
* @uses phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
||||
* @uses phpDocumentor\Reflection\DocBlock\Description
|
||||
*/
|
||||
public function testTagsAreInterpretedUsingFactory()
|
||||
public function testTagsAreInterpretedUsingFactory(): void
|
||||
{
|
||||
$tagString = <<<TAG
|
||||
@author Mike van Riel <[email protected]> This is with
|
||||
@@ -255,7 +255,7 @@ DOCBLOCK
|
||||
* @uses phpDocumentor\Reflection\Types\Context
|
||||
* @uses phpDocumentor\Reflection\DocBlock\Tags\Param
|
||||
*/
|
||||
public function testTagsWithContextNamespace()
|
||||
public function testTagsWithContextNamespace(): void
|
||||
{
|
||||
$tagFactoryMock = m::mock(TagFactory::class);
|
||||
$fixture = new DocBlockFactory(m::mock(DescriptionFactory::class), $tagFactoryMock);
|
||||
@@ -274,7 +274,7 @@ DOCBLOCK
|
||||
* @uses phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
||||
* @uses phpDocumentor\Reflection\DocBlock\Description
|
||||
*/
|
||||
public function testTagsAreFilteredForNullValues()
|
||||
public function testTagsAreFilteredForNullValues(): void
|
||||
{
|
||||
$tagString = <<<TAG
|
||||
@author Mike van Riel <[email protected]> This is with
|
||||
|
||||
+12
-12
@@ -28,7 +28,7 @@ class DocBlockTest extends TestCase
|
||||
/**
|
||||
* Call Mockery::close after each test.
|
||||
*/
|
||||
public function tearDown()
|
||||
public function tearDown(): void
|
||||
{
|
||||
m::close();
|
||||
}
|
||||
@@ -39,7 +39,7 @@ class DocBlockTest extends TestCase
|
||||
*
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
*/
|
||||
public function testDocBlockCanHaveASummary()
|
||||
public function testDocBlockCanHaveASummary(): void
|
||||
{
|
||||
$summary = 'This is a summary';
|
||||
|
||||
@@ -54,7 +54,7 @@ class DocBlockTest extends TestCase
|
||||
*
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
*/
|
||||
public function testDocBlockCanHaveADescription()
|
||||
public function testDocBlockCanHaveADescription(): void
|
||||
{
|
||||
$description = new DocBlock\Description('');
|
||||
|
||||
@@ -70,7 +70,7 @@ class DocBlockTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Tag
|
||||
*/
|
||||
public function testDocBlockCanHaveTags()
|
||||
public function testDocBlockCanHaveTags(): void
|
||||
{
|
||||
$tags = [
|
||||
m::mock(DocBlock\Tag::class)
|
||||
@@ -90,7 +90,7 @@ class DocBlockTest extends TestCase
|
||||
*
|
||||
* @expectedException \InvalidArgumentException
|
||||
*/
|
||||
public function testDocBlockAllowsOnlyTags()
|
||||
public function testDocBlockAllowsOnlyTags(): void
|
||||
{
|
||||
$tags = [
|
||||
null
|
||||
@@ -107,7 +107,7 @@ class DocBlockTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Tag
|
||||
*/
|
||||
public function testFindTagsInDocBlockByName()
|
||||
public function testFindTagsInDocBlockByName(): void
|
||||
{
|
||||
$tag1 = m::mock(DocBlock\Tag::class);
|
||||
$tag2 = m::mock(DocBlock\Tag::class);
|
||||
@@ -132,7 +132,7 @@ class DocBlockTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Tag
|
||||
*/
|
||||
public function testCheckIfThereAreTagsWithAGivenName()
|
||||
public function testCheckIfThereAreTagsWithAGivenName(): void
|
||||
{
|
||||
$tag1 = m::mock(DocBlock\Tag::class);
|
||||
$tag2 = m::mock(DocBlock\Tag::class);
|
||||
@@ -156,7 +156,7 @@ class DocBlockTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
* @uses \phpDocumentor\Reflection\Types\Context
|
||||
*/
|
||||
public function testDocBlockKnowsInWhichNamespaceItIsAndWhichAliasesThereAre()
|
||||
public function testDocBlockKnowsInWhichNamespaceItIsAndWhichAliasesThereAre(): void
|
||||
{
|
||||
$context = new Context('');
|
||||
|
||||
@@ -172,7 +172,7 @@ class DocBlockTest extends TestCase
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
* @uses \phpDocumentor\Reflection\Location
|
||||
*/
|
||||
public function testDocBlockKnowsAtWhichLineItIs()
|
||||
public function testDocBlockKnowsAtWhichLineItIs(): void
|
||||
{
|
||||
$location = new Location(10);
|
||||
|
||||
@@ -187,7 +187,7 @@ class DocBlockTest extends TestCase
|
||||
*
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
*/
|
||||
public function testDocBlockKnowsIfItIsTheStartOfADocBlockTemplate()
|
||||
public function testDocBlockKnowsIfItIsTheStartOfADocBlockTemplate(): void
|
||||
{
|
||||
$fixture = new DocBlock('', null, [], null, null, true);
|
||||
|
||||
@@ -200,7 +200,7 @@ class DocBlockTest extends TestCase
|
||||
*
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
*/
|
||||
public function testDocBlockKnowsIfItIsTheEndOfADocBlockTemplate()
|
||||
public function testDocBlockKnowsIfItIsTheEndOfADocBlockTemplate(): void
|
||||
{
|
||||
$fixture = new DocBlock('', null, [], null, null, false, true);
|
||||
|
||||
@@ -213,7 +213,7 @@ class DocBlockTest extends TestCase
|
||||
*
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Deprecated
|
||||
*/
|
||||
public function testRemoveTag()
|
||||
public function testRemoveTag(): void
|
||||
{
|
||||
$someTag = new Deprecated();
|
||||
$anotherTag = new Deprecated();
|
||||
|
||||
Reference in New Issue
Block a user