From a1d8751ad6984fa33d714949ee961f24df852add Mon Sep 17 00:00:00 2001 From: TomasVotruba Date: Mon, 27 Nov 2017 00:03:04 +0100 Subject: [PATCH] tests: add strict_types and typehints, remove tests that are now covered by typehints --- .../DocblocksWithAnnotationsTest.php | 3 +- .../integration/InterpretingDocBlocksTest.php | 3 +- .../ReconstitutingADocBlockTest.php | 3 +- tests/integration/UsingTagsTest.php | 3 +- .../unit/DocBlock/DescriptionFactoryTest.php | 3 +- tests/unit/DocBlock/DescriptionTest.php | 12 +----- tests/unit/DocBlock/ExampleFinderTest.php | 2 +- tests/unit/DocBlock/SerializerTest.php | 39 +------------------ .../unit/DocBlock/StandardTagFactoryTest.php | 3 +- tests/unit/DocBlock/Tags/AuthorTest.php | 3 +- tests/unit/DocBlock/Tags/CoversTest.php | 3 +- tests/unit/DocBlock/Tags/DeprecatedTest.php | 3 +- tests/unit/DocBlock/Tags/ExampleTest.php | 2 +- .../Tags/Formatter/AlignFormatterTest.php | 3 +- .../Formatter/PassthroughFormatterTest.php | 3 +- tests/unit/DocBlock/Tags/GenericTest.php | 3 +- tests/unit/DocBlock/Tags/LinkTest.php | 3 +- tests/unit/DocBlock/Tags/MethodTest.php | 11 +++--- tests/unit/DocBlock/Tags/ParamTest.php | 3 +- tests/unit/DocBlock/Tags/PropertyReadTest.php | 3 +- tests/unit/DocBlock/Tags/PropertyTest.php | 3 +- .../unit/DocBlock/Tags/PropertyWriteTest.php | 3 +- tests/unit/DocBlock/Tags/ReturnTest.php | 3 +- tests/unit/DocBlock/Tags/SeeTest.php | 3 +- tests/unit/DocBlock/Tags/SinceTest.php | 3 +- tests/unit/DocBlock/Tags/SourceTest.php | 3 +- tests/unit/DocBlock/Tags/ThrowsTest.php | 3 +- tests/unit/DocBlock/Tags/UsesTest.php | 3 +- tests/unit/DocBlock/Tags/VarTest.php | 3 +- tests/unit/DocBlock/Tags/VersionTest.php | 3 +- tests/unit/DocBlockFactoryTest.php | 3 +- tests/unit/DocBlockTest.php | 3 +- 32 files changed, 66 insertions(+), 81 deletions(-) diff --git a/tests/integration/DocblocksWithAnnotationsTest.php b/tests/integration/DocblocksWithAnnotationsTest.php index 9864643..ffd9c42 100644 --- a/tests/integration/DocblocksWithAnnotationsTest.php +++ b/tests/integration/DocblocksWithAnnotationsTest.php @@ -1,4 +1,5 @@ -assertSame($expected, (string)$fixture); } - - /** - * @covers ::__construct - * @expectedException \InvalidArgumentException - */ - public function testBodyTemplateMustBeAString() - { - new Description([]); - } } diff --git a/tests/unit/DocBlock/ExampleFinderTest.php b/tests/unit/DocBlock/ExampleFinderTest.php index 7c306fa..78e81df 100644 --- a/tests/unit/DocBlock/ExampleFinderTest.php +++ b/tests/unit/DocBlock/ExampleFinderTest.php @@ -1,4 +1,4 @@ -removeTag($genericTag); $this->assertSame($expectedAfterRemove, $fixture->getDocComment($docBlock)); } - - /** - * @covers ::__construct - * @expectedException \InvalidArgumentException - */ - public function testInitializationFailsIfIndentIsNotAnInteger() - { - new Serializer([]); - } - - /** - * @covers ::__construct - * @expectedException \InvalidArgumentException - */ - public function testInitializationFailsIfIndentStringIsNotAString() - { - new Serializer(0, []); - } - - /** - * @covers ::__construct - * @expectedException \InvalidArgumentException - */ - public function testInitializationFailsIfIndentFirstLineIsNotABoolean() - { - new Serializer(0, '', []); - } - - /** - * @covers ::__construct - * @expectedException \InvalidArgumentException - */ - public function testInitializationFailsIfLineLengthIsNotNullNorAnInteger() - { - new Serializer(0, '', false, []); - } } diff --git a/tests/unit/DocBlock/StandardTagFactoryTest.php b/tests/unit/DocBlock/StandardTagFactoryTest.php index 13d60e9..a181e65 100644 --- a/tests/unit/DocBlock/StandardTagFactoryTest.php +++ b/tests/unit/DocBlock/StandardTagFactoryTest.php @@ -1,4 +1,5 @@ -