diff --git a/tests/integration/InterpretingDocBlocksTest.php b/tests/integration/InterpretingDocBlocksTest.php index 099e40a..ffec7ad 100644 --- a/tests/integration/InterpretingDocBlocksTest.php +++ b/tests/integration/InterpretingDocBlocksTest.php @@ -60,11 +60,13 @@ DOCBLOCK; public function testInterpretingASimpleDocBlock(): void { - /** - * @var DocBlock $docblock - * @var string $summary - * @var Description $description - */ + /** @var DocBlock $docblock */ + $docblock; + /** @var string $summary */ + $summary; + /** @var Description $description */ + $description; + include(__DIR__ . '/../../examples/01-interpreting-a-simple-docblock.php'); $descriptionText = <<assertTrue($hasSeeTag); @@ -105,15 +110,19 @@ DESCRIPTION; public function testDescriptionsCanEscapeAtSignsAndClosingBraces(): void { - /** - * @var string $docComment - * @var DocBlock $docblock - * @var Description $description - * @var string $receivedDocComment - * @var string $foundDescription - */ + /** @var string $docComment */ + $docComment; + /** @var DocBlock $docblock */ + $docblock; + /** @var Description $description */ + $description; + /** @var string $receivedDocComment */ + $receivedDocComment; + /** @var string $foundDescription */ + $foundDescription; include(__DIR__ . '/../../examples/playing-with-descriptions/02-escaping.php'); + $this->assertSame( <<<'DESCRIPTION' You can escape the @-sign by surrounding it with braces, for example: @. And escape a closing brace within an diff --git a/tests/integration/ReconstitutingADocBlockTest.php b/tests/integration/ReconstitutingADocBlockTest.php index 9d99f67..c8eda66 100644 --- a/tests/integration/ReconstitutingADocBlockTest.php +++ b/tests/integration/ReconstitutingADocBlockTest.php @@ -31,10 +31,11 @@ class ReconstitutingADocBlockTest extends TestCase public function testReconstituteADocBlock(): void { - /** - * @var string $docComment - * @var string $reconstitutedDocComment - */ + /** @var string $docComment */ + $docComment; + /** @var string $reconstitutedDocComment */ + $reconstitutedDocComment; + include(__DIR__ . '/../../examples/03-reconstituting-a-docblock.php'); $this->assertSame($docComment, $reconstitutedDocComment); diff --git a/tests/integration/UsingTagsTest.php b/tests/integration/UsingTagsTest.php index 101cbf8..eb5d429 100644 --- a/tests/integration/UsingTagsTest.php +++ b/tests/integration/UsingTagsTest.php @@ -33,11 +33,13 @@ class UsingTagsTest extends TestCase public function testAddingYourOwnTagUsingAStaticMethodAsFactory(): void { - /** - * @var object[] $customTagObjects - * @var string $docComment - * @var string $reconstitutedDocComment - */ + /** @var object[] $customTagObjects */ + $customTagObjects; + /** @var string $docComment */ + $docComment; + /** @var string $reconstitutedDocComment */ + $reconstitutedDocComment; + include(__DIR__ . '/../../examples/04-adding-your-own-tag.php'); $this->assertInstanceOf(\MyTag::class, $customTagObjects[0]);