diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 69debb78..92af46bd 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,28 +1,25 @@ - + + + src + + + + + + ./tests/unit/ - - - src - - - - - + diff --git a/tests/unit/CollectionResolverTest.php b/tests/unit/CollectionResolverTest.php index 11807dbb..815cb96c 100644 --- a/tests/unit/CollectionResolverTest.php +++ b/tests/unit/CollectionResolverTest.php @@ -27,9 +27,6 @@ use PHPUnit\Framework\TestCase; use RuntimeException; -/** - * @coversDefaultClass \phpDocumentor\Reflection\TypeResolver - */ class CollectionResolverTest extends TestCase { /** @@ -37,10 +34,6 @@ class CollectionResolverTest extends TestCase * @uses \phpDocumentor\Reflection\Types\Compound * @uses \phpDocumentor\Reflection\PseudoTypes\Generic * @uses \phpDocumentor\Reflection\Types\String_ - * - * @covers ::resolve - * @covers ::createType - * @covers ::__construct */ public function testResolvingCollection(): void { @@ -59,10 +52,6 @@ public function testResolvingCollection(): void * @uses \phpDocumentor\Reflection\Types\Compound * @uses \phpDocumentor\Reflection\PseudoTypes\Generic * @uses \phpDocumentor\Reflection\Types\String_ - * - * @covers ::__construct - * @covers ::resolve - * @covers ::createType */ public function testResolvingCollectionWithKeyType(): void { @@ -86,10 +75,6 @@ public function testResolvingCollectionWithKeyType(): void * @uses \phpDocumentor\Reflection\Types\Context * @uses \phpDocumentor\Reflection\Types\Compound * @uses \phpDocumentor\Reflection\Types\String_ - * - * @covers ::__construct - * @covers ::resolve - * @covers ::createType */ public function testResolvingArrayCollection(): void { @@ -112,10 +97,6 @@ public function testResolvingArrayCollection(): void * @uses \phpDocumentor\Reflection\Types\Context * @uses \phpDocumentor\Reflection\Types\Compound * @uses \phpDocumentor\Reflection\Types\String_ - * - * @covers ::__construct - * @covers ::resolve - * @covers ::createType */ public function testResolvingArrayCollectionWithKey(): void { @@ -138,10 +119,6 @@ public function testResolvingArrayCollectionWithKey(): void * @uses \phpDocumentor\Reflection\Types\Context * @uses \phpDocumentor\Reflection\Types\Compound * @uses \phpDocumentor\Reflection\Types\String_ - - * @covers ::__construct - * @covers ::resolve - * @covers ::createType */ public function testResolvingArrayCollectionWithKeyAndWhitespace(): void { @@ -165,10 +142,6 @@ public function testResolvingArrayCollectionWithKeyAndWhitespace(): void * @uses \phpDocumentor\Reflection\Types\Compound * @uses \phpDocumentor\Reflection\PseudoTypes\Generic * @uses \phpDocumentor\Reflection\Types\String_ - * - * @covers ::__construct - * @covers ::resolve - * @covers ::createType */ public function testResolvingCollectionOfCollection(): void { @@ -194,11 +167,6 @@ public function testResolvingCollectionOfCollection(): void $this->assertEquals(new Object_(new Fqsen('\\DateTime')), $nestedGenericTypes[0]); } - /** - * @covers ::__construct - * @covers ::resolve - * @covers ::createType - */ public function testGoodArrayCollectionKey(): void { $fixture = new TypeResolver(); @@ -214,11 +182,6 @@ public function testGoodArrayCollectionKey(): void $this->assertSame('array', (string) $resolvedType); } - /** - * @covers ::__construct - * @covers ::resolve - * @covers ::createType - */ public function testMissingStartCollection(): void { $this->expectException(RuntimeException::class); @@ -227,11 +190,6 @@ public function testMissingStartCollection(): void $fixture->resolve('', new Context('')); } - /** - * @covers ::__construct - * @covers ::resolve - * @covers ::createType - */ public function testMissingEndCollection(): void { $this->expectException(RuntimeException::class); @@ -240,11 +198,6 @@ public function testMissingEndCollection(): void $fixture->resolve('ArrayObjectexpectException(RuntimeException::class); @@ -257,10 +210,6 @@ public function testBadCollectionClass(): void * @uses \phpDocumentor\Reflection\Types\Context * @uses \phpDocumentor\Reflection\Types\Compound * @uses \phpDocumentor\Reflection\Types\String_ - * - * @covers ::__construct - * @covers ::resolve - * @covers ::createType */ public function testResolvingCollectionAsArray(): void { @@ -282,10 +231,6 @@ public function testResolvingCollectionAsArray(): void /** * @uses \phpDocumentor\Reflection\Types\Context * @uses \phpDocumentor\Reflection\Types\String_ - * - * @covers ::__construct - * @covers ::resolve - * @covers ::createType */ public function testResolvingList(): void { @@ -307,10 +252,6 @@ public function testResolvingList(): void /** * @uses \phpDocumentor\Reflection\Types\Context * @uses \phpDocumentor\Reflection\Types\String_ - * - * @covers ::__construct - * @covers ::resolve - * @covers ::createType */ public function testResolvingNonEmptyList(): void { @@ -332,10 +273,6 @@ public function testResolvingNonEmptyList(): void /** * @uses \phpDocumentor\Reflection\Types\Context * @uses \phpDocumentor\Reflection\Types\Nullable - * - * @covers ::__construct - * @covers ::resolve - * @covers ::createType */ public function testResolvingNullableArray(): void { diff --git a/tests/unit/FqsenResolverTest.php b/tests/unit/FqsenResolverTest.php index ae4bb184..a363e0de 100644 --- a/tests/unit/FqsenResolverTest.php +++ b/tests/unit/FqsenResolverTest.php @@ -17,14 +17,8 @@ use phpDocumentor\Reflection\Types\Context; use PHPUnit\Framework\TestCase; -/** - * @coversDefaultClass \phpDocumentor\Reflection\FqsenResolver - */ final class FqsenResolverTest extends TestCase { - /** - * @covers ::resolve - */ public function testResolveFqsen(): void { $fqsenResolver = new FqsenResolver(); @@ -35,9 +29,6 @@ public function testResolveFqsen(): void static::assertSame('\DocBlock', (string) $result); } - /** - * @covers ::resolve - */ public function testResolveFqsenWithEmoji(): void { $fqsenResolver = new FqsenResolver(); @@ -48,9 +39,6 @@ public function testResolveFqsenWithEmoji(): void static::assertSame('\My😁DocBlock', (string) $result); } - /** - * @covers ::resolve - */ public function testResolveWithoutContext(): void { $fqsenResolver = new FqsenResolver(); @@ -59,9 +47,6 @@ public function testResolveWithoutContext(): void static::assertSame('\DocBlock', (string) $result); } - /** - * @covers ::resolve - */ public function testResolveFromAlias(): void { $fqsenResolver = new FqsenResolver(); @@ -72,9 +57,6 @@ public function testResolveFromAlias(): void static::assertSame('\some\other\ns', (string) $result); } - /** - * @covers ::resolve - */ public function testResolveFromPartialAlias(): void { $fqsenResolver = new FqsenResolver(); @@ -85,9 +67,6 @@ public function testResolveFromPartialAlias(): void static::assertSame('\some\other\ns', (string) $result); } - /** - * @covers ::resolve - */ public function testResolveThrowsExceptionWhenGarbageInputIsPassed(): void { $this->expectException(InvalidArgumentException::class); diff --git a/tests/unit/IntegerRangeResolverTest.php b/tests/unit/IntegerRangeResolverTest.php index e143a396..09465b6f 100644 --- a/tests/unit/IntegerRangeResolverTest.php +++ b/tests/unit/IntegerRangeResolverTest.php @@ -18,19 +18,12 @@ use PHPUnit\Framework\TestCase; use RuntimeException; -/** - * @coversDefaultClass \phpDocumentor\Reflection\TypeResolver - */ class IntegerRangeResolverTest extends TestCase { /** * @uses \phpDocumentor\Reflection\Types\Context * @uses \phpDocumentor\Reflection\Types\Compound * @uses \phpDocumentor\Reflection\Types\String_ - * - * @covers ::__construct - * @covers ::resolve - * @covers ::createType */ public function testResolvingIntRange(): void { @@ -52,10 +45,6 @@ public function testResolvingIntRange(): void * @uses \phpDocumentor\Reflection\Types\Context * @uses \phpDocumentor\Reflection\Types\Compound * @uses \phpDocumentor\Reflection\Types\String_ - * - * @covers ::__construct - * @covers ::resolve - * @covers ::createType */ public function testResolvingIntRangeWithKeywords(): void { @@ -77,10 +66,6 @@ public function testResolvingIntRangeWithKeywords(): void * @uses \phpDocumentor\Reflection\Types\Context * @uses \phpDocumentor\Reflection\Types\Compound * @uses \phpDocumentor\Reflection\Types\String_ - * - * @covers ::__construct - * @covers ::resolve - * @covers ::createType */ public function testResolvingIntRangeErrorMissingMaxValue(): void { @@ -95,10 +80,6 @@ public function testResolvingIntRangeErrorMissingMaxValue(): void * @uses \phpDocumentor\Reflection\Types\Context * @uses \phpDocumentor\Reflection\Types\Compound * @uses \phpDocumentor\Reflection\Types\String_ - * - * @covers ::__construct - * @covers ::resolve - * @covers ::createType */ public function testResolvingIntRangeErrorMisingMinValue(): void { @@ -113,10 +94,6 @@ public function testResolvingIntRangeErrorMisingMinValue(): void * @uses \phpDocumentor\Reflection\Types\Context * @uses \phpDocumentor\Reflection\Types\Compound * @uses \phpDocumentor\Reflection\Types\String_ - * - * @covers ::__construct - * @covers ::resolve - * @covers ::createType */ public function testResolvingIntRangeErrorMisingComma(): void { @@ -131,10 +108,6 @@ public function testResolvingIntRangeErrorMisingComma(): void * @uses \phpDocumentor\Reflection\Types\Context * @uses \phpDocumentor\Reflection\Types\Compound * @uses \phpDocumentor\Reflection\Types\String_ - * - * @covers ::__construct - * @covers ::resolve - * @covers ::createType */ public function testResolvingIntRangeErrorMissingEnd(): void { diff --git a/tests/unit/NumericResolverTest.php b/tests/unit/NumericResolverTest.php index a2ae5411..75776979 100644 --- a/tests/unit/NumericResolverTest.php +++ b/tests/unit/NumericResolverTest.php @@ -20,17 +20,12 @@ use phpDocumentor\Reflection\Types\String_; use PHPUnit\Framework\TestCase; -/** - * @coversDefaultClass \phpDocumentor\Reflection\TypeResolver - */ class NumericResolverTest extends TestCase { /** * @uses \phpDocumentor\Reflection\Types\Context * @uses \phpDocumentor\Reflection\Types\Compound * @uses \phpDocumentor\Reflection\Types\String_ - * - * @covers ::__construct */ public function testResolvingIntRange(): void { diff --git a/tests/unit/PseudoTypes/ArrayKeyTest.php b/tests/unit/PseudoTypes/ArrayKeyTest.php index 8702f068..c8ba5d8c 100644 --- a/tests/unit/PseudoTypes/ArrayKeyTest.php +++ b/tests/unit/PseudoTypes/ArrayKeyTest.php @@ -17,15 +17,8 @@ use phpDocumentor\Reflection\Types\String_; use PHPUnit\Framework\TestCase; -/** - * @coversDefaultClass \phpDocumentor\Reflection\PseudoTypes\ArrayKey - */ final class ArrayKeyTest extends TestCase { - /** - * @covers ::__construct - * @covers ::__toString - */ public function testArrayKeyCanBeConstructedAndStringifiedCorrectly(): void { $this->assertSame('array-key', (string) (new ArrayKey())); @@ -33,8 +26,6 @@ public function testArrayKeyCanBeConstructedAndStringifiedCorrectly(): void /** * @uses \phpDocumentor\Reflection\PseudoTypes\ArrayKey::__construct - * - * @covers ::getIterator */ public function testArrayKeyCanBeIterated(): void { diff --git a/tests/unit/PseudoTypes/ArrayShapeTest.php b/tests/unit/PseudoTypes/ArrayShapeTest.php index 981a98ba..14f3af35 100644 --- a/tests/unit/PseudoTypes/ArrayShapeTest.php +++ b/tests/unit/PseudoTypes/ArrayShapeTest.php @@ -6,14 +6,8 @@ use PHPUnit\Framework\TestCase; -/** - * @coversDefaultClass \phpDocumentor\Reflection\PseudoTypes\ArrayShape - */ class ArrayShapeTest extends TestCase { - /** - * @covers ::getItems - */ public function testExposeItems(): void { $item1 = new ArrayShapeItem('foo', new True_(), false); @@ -26,7 +20,6 @@ public function testExposeItems(): void /** * @dataProvider provideToStringData - * @covers ::__toString */ public function testToString(string $expectedResult, ArrayShape $arrayShape): void { diff --git a/tests/unit/PseudoTypes/ClassStringTest.php b/tests/unit/PseudoTypes/ClassStringTest.php index 838846d0..fe5cbe2f 100644 --- a/tests/unit/PseudoTypes/ClassStringTest.php +++ b/tests/unit/PseudoTypes/ClassStringTest.php @@ -18,14 +18,10 @@ use phpDocumentor\Reflection\Types\Object_; use PHPUnit\Framework\TestCase; -/** - * @coversDefaultClass \phpDocumentor\Reflection\PseudoTypes\ClassString - */ class ClassStringTest extends TestCase { /** * @dataProvider provideClassStrings - * @covers ::__toString */ public function testClassStringStringifyCorrectly(ClassString $type, string $expectedString): void { diff --git a/tests/unit/PseudoTypes/ConditionalForParameterTest.php b/tests/unit/PseudoTypes/ConditionalForParameterTest.php index 7eec9c35..bedae079 100644 --- a/tests/unit/PseudoTypes/ConditionalForParameterTest.php +++ b/tests/unit/PseudoTypes/ConditionalForParameterTest.php @@ -9,18 +9,8 @@ use phpDocumentor\Reflection\Types\Static_; use PHPUnit\Framework\TestCase; -/** - * @coversDefaultClass \phpDocumentor\Reflection\PseudoTypes\ConditionalForParameter - */ class ConditionalForParameterTest extends TestCase { - /** - * @covers ::isNegated - * @covers ::getParameterName - * @covers ::getTargetType - * @covers ::getIf - * @covers ::getElse - */ public function testCreate(): void { $parameterName = 'some'; @@ -38,7 +28,6 @@ public function testCreate(): void /** * @dataProvider provideToStringData - * @covers ::__toString */ public function testToString(string $expectedResult, ConditionalForParameter $type): void { diff --git a/tests/unit/PseudoTypes/ConditionalTest.php b/tests/unit/PseudoTypes/ConditionalTest.php index aff523de..3e6f5851 100644 --- a/tests/unit/PseudoTypes/ConditionalTest.php +++ b/tests/unit/PseudoTypes/ConditionalTest.php @@ -11,18 +11,8 @@ use phpDocumentor\Reflection\Types\Static_; use PHPUnit\Framework\TestCase; -/** - * @coversDefaultClass \phpDocumentor\Reflection\PseudoTypes\Conditional - */ class ConditionalTest extends TestCase { - /** - * @covers ::isNegated - * @covers ::getSubjectType - * @covers ::getTargetType - * @covers ::getIf - * @covers ::getElse - */ public function testCreate(): void { $subjectType = new Object_(new Fqsen('\\phpDocumentor\\T')); @@ -40,7 +30,6 @@ public function testCreate(): void /** * @dataProvider provideToStringData - * @covers ::__toString */ public function testToString(string $expectedResult, Conditional $type): void { diff --git a/tests/unit/PseudoTypes/FalseTest.php b/tests/unit/PseudoTypes/FalseTest.php index 296614c8..4a6d2604 100644 --- a/tests/unit/PseudoTypes/FalseTest.php +++ b/tests/unit/PseudoTypes/FalseTest.php @@ -16,14 +16,8 @@ use phpDocumentor\Reflection\Types\Boolean; use PHPUnit\Framework\TestCase; -/** - * @coversDefaultClass \phpDocumentor\Reflection\PseudoTypes\False_ - */ final class FalseTest extends TestCase { - /** - * @covers ::underlyingType - */ public function testExposesUnderlyingType(): void { $false = new False_(); @@ -31,9 +25,6 @@ public function testExposesUnderlyingType(): void $this->assertInstanceOf(Boolean::class, $false->underlyingType()); } - /** - * @covers ::__toString - */ public function testFalseStringifyCorrectly(): void { $false = new False_(); diff --git a/tests/unit/PseudoTypes/GenericTest.php b/tests/unit/PseudoTypes/GenericTest.php index af7d94c5..ff7880be 100644 --- a/tests/unit/PseudoTypes/GenericTest.php +++ b/tests/unit/PseudoTypes/GenericTest.php @@ -11,15 +11,8 @@ use phpDocumentor\Reflection\Types\String_; use PHPUnit\Framework\TestCase; -/** - * @coversDefaultClass \phpDocumentor\Reflection\PseudoTypes\Generic - */ class GenericTest extends TestCase { - /** - * @covers ::getFqsen - * @covers ::getTypes - */ public function testCreate(): void { $fqsen = new Fqsen('\\Foo\\Bar'); @@ -32,7 +25,6 @@ public function testCreate(): void /** * @dataProvider provideToStringData - * @covers ::__toString */ public function testToString(string $expectedResult, Generic $type): void { diff --git a/tests/unit/PseudoTypes/IntMaskOfTest.php b/tests/unit/PseudoTypes/IntMaskOfTest.php index 18789d43..b48edfc1 100644 --- a/tests/unit/PseudoTypes/IntMaskOfTest.php +++ b/tests/unit/PseudoTypes/IntMaskOfTest.php @@ -7,14 +7,8 @@ use phpDocumentor\Reflection\Types\Compound; use PHPUnit\Framework\TestCase; -/** - * @coversDefaultClass \phpDocumentor\Reflection\PseudoTypes\IntMaskOf - */ class IntMaskOfTest extends TestCase { - /** - * @covers ::getType - */ public function testCreate(): void { $childType = new Compound([new IntegerValue(1), new IntegerValue(5), new IntegerValue(10)]); @@ -23,9 +17,6 @@ public function testCreate(): void $this->assertSame($childType, $type->getType()); } - /** - * @covers ::__toString - */ public function testToString(): void { $type = new IntMaskOf(new Compound([new IntegerValue(1), new IntegerValue(5), new IntegerValue(10)])); diff --git a/tests/unit/PseudoTypes/IntMaskTest.php b/tests/unit/PseudoTypes/IntMaskTest.php index 59fba2c8..e2e08818 100644 --- a/tests/unit/PseudoTypes/IntMaskTest.php +++ b/tests/unit/PseudoTypes/IntMaskTest.php @@ -6,14 +6,8 @@ use PHPUnit\Framework\TestCase; -/** - * @coversDefaultClass \phpDocumentor\Reflection\PseudoTypes\IntMask - */ class IntMaskTest extends TestCase { - /** - * @covers ::getTypes - */ public function testCreate(): void { $childTypes = [new IntegerValue(1), new IntegerValue(5), new IntegerValue(10)]; @@ -22,9 +16,6 @@ public function testCreate(): void $this->assertSame($childTypes, $type->getTypes()); } - /** - * @covers ::__toString - */ public function testToString(): void { $type = new IntMask(new IntegerValue(1), new IntegerValue(510), new IntegerValue(6000)); diff --git a/tests/unit/PseudoTypes/IntRangeTest.php b/tests/unit/PseudoTypes/IntRangeTest.php index f5d9293a..cf32440e 100644 --- a/tests/unit/PseudoTypes/IntRangeTest.php +++ b/tests/unit/PseudoTypes/IntRangeTest.php @@ -15,14 +15,10 @@ use PHPUnit\Framework\TestCase; -/** - * @coversDefaultClass \phpDocumentor\Reflection\PseudoTypes\List_ - */ class IntRangeTest extends TestCase { /** * @dataProvider provideArrays - * @covers ::__toString */ public function testArrayStringifyCorrectly(IntegerRange $array, string $expectedString): void { diff --git a/tests/unit/PseudoTypes/InterfaceStringTest.php b/tests/unit/PseudoTypes/InterfaceStringTest.php index 06b18029..5a6becca 100644 --- a/tests/unit/PseudoTypes/InterfaceStringTest.php +++ b/tests/unit/PseudoTypes/InterfaceStringTest.php @@ -18,14 +18,10 @@ use phpDocumentor\Reflection\Types\Object_; use PHPUnit\Framework\TestCase; -/** - * @coversDefaultClass \phpDocumentor\Reflection\PseudoTypes\InterfaceString - */ class InterfaceStringTest extends TestCase { /** * @dataProvider provideInterfaceStrings - * @covers ::__toString */ public function testInterfaceStringStringifyCorrectly(InterfaceString $type, string $expectedString): void { diff --git a/tests/unit/PseudoTypes/KeyOfTest.php b/tests/unit/PseudoTypes/KeyOfTest.php index ced324a7..c96d837d 100644 --- a/tests/unit/PseudoTypes/KeyOfTest.php +++ b/tests/unit/PseudoTypes/KeyOfTest.php @@ -8,14 +8,8 @@ use phpDocumentor\Reflection\Types\Object_; use PHPUnit\Framework\TestCase; -/** - * @coversDefaultClass \phpDocumentor\Reflection\PseudoTypes\KeyOf - */ class KeyOfTest extends TestCase { - /** - * @covers ::getType - */ public function testCreate(): void { $childType = new ConstExpression(new Object_(new Fqsen('\\phpDocumentor\\Type')), 'ARRAY_CONST'); @@ -24,9 +18,6 @@ public function testCreate(): void $this->assertSame($childType, $type->getType()); } - /** - * @covers ::__toString - */ public function testToString(): void { $type = new KeyOf(new ConstExpression(new Object_(new Fqsen('\\phpDocumentor\\Type')), 'ARRAY_CONST')); diff --git a/tests/unit/PseudoTypes/ListTest.php b/tests/unit/PseudoTypes/ListTest.php index ebd5676c..6fb313e0 100644 --- a/tests/unit/PseudoTypes/ListTest.php +++ b/tests/unit/PseudoTypes/ListTest.php @@ -19,14 +19,10 @@ use phpDocumentor\Reflection\Types\String_; use PHPUnit\Framework\TestCase; -/** - * @coversDefaultClass \phpDocumentor\Reflection\PseudoTypes\List_ - */ class ListTest extends TestCase { /** * @dataProvider provideArrays - * @covers ::__toString */ public function testArrayStringifyCorrectly(List_ $array, string $expectedString): void { diff --git a/tests/unit/PseudoTypes/NonEmptyArrayTest.php b/tests/unit/PseudoTypes/NonEmptyArrayTest.php index b1511292..0ae5acd5 100644 --- a/tests/unit/PseudoTypes/NonEmptyArrayTest.php +++ b/tests/unit/PseudoTypes/NonEmptyArrayTest.php @@ -19,14 +19,10 @@ use phpDocumentor\Reflection\Types\String_; use PHPUnit\Framework\TestCase; -/** - * @coversDefaultClass \phpDocumentor\Reflection\PseudoTypes\NonEmptyArray - */ class NonEmptyArrayTest extends TestCase { /** * @dataProvider provideArrays - * @covers ::__toString */ public function testArrayStringifyCorrectly(NonEmptyArray $array, string $expectedString): void { diff --git a/tests/unit/PseudoTypes/NonEmptyListTest.php b/tests/unit/PseudoTypes/NonEmptyListTest.php index 8f144057..69dedd79 100644 --- a/tests/unit/PseudoTypes/NonEmptyListTest.php +++ b/tests/unit/PseudoTypes/NonEmptyListTest.php @@ -19,14 +19,10 @@ use phpDocumentor\Reflection\Types\String_; use PHPUnit\Framework\TestCase; -/** - * @coversDefaultClass \phpDocumentor\Reflection\PseudoTypes\NonEmptyList - */ class NonEmptyListTest extends TestCase { /** * @dataProvider provideArrays - * @covers ::__toString */ public function testArrayStringifyCorrectly(NonEmptyList $array, string $expectedString): void { diff --git a/tests/unit/PseudoTypes/OffsetAccessTest.php b/tests/unit/PseudoTypes/OffsetAccessTest.php index 34bd1c8f..44afa047 100644 --- a/tests/unit/PseudoTypes/OffsetAccessTest.php +++ b/tests/unit/PseudoTypes/OffsetAccessTest.php @@ -8,15 +8,8 @@ use phpDocumentor\Reflection\Types\Object_; use PHPUnit\Framework\TestCase; -/** - * @coversDefaultClass \phpDocumentor\Reflection\PseudoTypes\OffsetAccess - */ class OffsetAccessTest extends TestCase { - /** - * @covers ::getType - * @covers ::getOffset - */ public function testCreate(): void { $mainType = new Object_(new Fqsen('\\phpDocumentor\\MyArray')); @@ -29,7 +22,6 @@ public function testCreate(): void /** * @dataProvider provideToStringData - * @covers ::__toString */ public function testToString(string $expectedResult, OffsetAccess $type): void { diff --git a/tests/unit/PseudoTypes/TrueTest.php b/tests/unit/PseudoTypes/TrueTest.php index 5dba2662..87f29c87 100644 --- a/tests/unit/PseudoTypes/TrueTest.php +++ b/tests/unit/PseudoTypes/TrueTest.php @@ -16,14 +16,8 @@ use phpDocumentor\Reflection\Types\Boolean; use PHPUnit\Framework\TestCase; -/** - * @coversDefaultClass \phpDocumentor\Reflection\PseudoTypes\True_ - */ class TrueTest extends TestCase { - /** - * @covers ::underlyingType - */ public function testExposesUnderlyingType(): void { $true = new True_(); @@ -31,9 +25,6 @@ public function testExposesUnderlyingType(): void $this->assertInstanceOf(Boolean::class, $true->underlyingType()); } - /** - * @covers ::__toString - */ public function testTrueStringifyCorrectly(): void { $true = new True_(); diff --git a/tests/unit/PseudoTypes/ValueOfTest.php b/tests/unit/PseudoTypes/ValueOfTest.php index e96e3056..2fc6f87d 100644 --- a/tests/unit/PseudoTypes/ValueOfTest.php +++ b/tests/unit/PseudoTypes/ValueOfTest.php @@ -8,14 +8,8 @@ use phpDocumentor\Reflection\Types\Object_; use PHPUnit\Framework\TestCase; -/** - * @coversDefaultClass \phpDocumentor\Reflection\PseudoTypes\ValueOf - */ class ValueOfTest extends TestCase { - /** - * @covers ::getType - */ public function testCreate(): void { $childType = new ConstExpression(new Object_(new Fqsen('\\phpDocumentor\\Type')), 'ARRAY_CONST'); @@ -24,9 +18,6 @@ public function testCreate(): void $this->assertSame($childType, $type->getType()); } - /** - * @covers ::__toString - */ public function testToString(): void { $type = new ValueOf(new ConstExpression(new Object_(new Fqsen('\\phpDocumentor\\Type')), 'ARRAY_CONST')); diff --git a/tests/unit/TypeResolverTest.php b/tests/unit/TypeResolverTest.php index ce126786..1e2d7881 100644 --- a/tests/unit/TypeResolverTest.php +++ b/tests/unit/TypeResolverTest.php @@ -83,9 +83,6 @@ use function get_class; -/** - * @coversDefaultClass \phpDocumentor\Reflection\TypeResolver - */ class TypeResolverTest extends TestCase { use VerifyDeprecations; @@ -97,10 +94,6 @@ class TypeResolverTest extends TestCase * * @param class-string $expectedClass * - * @covers ::__construct - * @covers ::resolve - * @covers ::createType - * * @dataProvider provideKeywords */ public function testResolvingKeywords(string $keyword, string $expectedClass): void @@ -118,10 +111,6 @@ public function testResolvingKeywords(string $keyword, string $expectedClass): v * @uses \phpDocumentor\Reflection\Fqsen * @uses \phpDocumentor\Reflection\FqsenResolver * - * @covers ::__construct - * @covers ::resolve - * @covers ::createType - * * @dataProvider provideFqcn */ public function testResolvingFQSENs(string $fqsen): void @@ -140,10 +129,6 @@ public function testResolvingFQSENs(string $fqsen): void * @uses \phpDocumentor\Reflection\Types\Object_ * @uses \phpDocumentor\Reflection\Fqsen * @uses \phpDocumentor\Reflection\FqsenResolver - * - * @covers ::__construct - * @covers ::resolve - * @covers ::createType */ public function testResolvingRelativeQSENsBasedOnNamespace(): void { @@ -161,10 +146,6 @@ public function testResolvingRelativeQSENsBasedOnNamespace(): void * @uses \phpDocumentor\Reflection\Types\Object_ * @uses \phpDocumentor\Reflection\Fqsen * @uses \phpDocumentor\Reflection\FqsenResolver - * - * @covers ::__construct - * @covers ::resolve - * @covers ::createType */ public function testResolvingRelativeQSENsBasedOnNamespaceAlias(): void { @@ -184,10 +165,6 @@ public function testResolvingRelativeQSENsBasedOnNamespaceAlias(): void * @uses \phpDocumentor\Reflection\Types\Context * @uses \phpDocumentor\Reflection\Types\Array_ * @uses \phpDocumentor\Reflection\Types\String_ - * - * @covers ::__construct - * @covers ::resolve - * @covers ::createType */ public function testResolvingTypedArrays(): void { @@ -205,10 +182,6 @@ public function testResolvingTypedArrays(): void * @uses \phpDocumentor\Reflection\Types\Context * @uses \phpDocumentor\Reflection\Types\Nullable * @uses \phpDocumentor\Reflection\Types\String_ - * - * @covers ::__construct - * @covers ::resolve - * @covers ::createType */ public function testResolvingNullableTypes(): void { @@ -225,10 +198,6 @@ public function testResolvingNullableTypes(): void * @uses \phpDocumentor\Reflection\Types\Context * @uses \phpDocumentor\Reflection\Types\Array_ * @uses \phpDocumentor\Reflection\Types\String_ - * - * @covers ::__construct - * @covers ::resolve - * @covers ::createType */ public function testResolvingNestedTypedArrays(): void { @@ -255,10 +224,6 @@ public function testResolvingNestedTypedArrays(): void * @uses \phpDocumentor\Reflection\Types\Object_ * @uses \phpDocumentor\Reflection\Fqsen * @uses \phpDocumentor\Reflection\FqsenResolver - * - * @covers ::__construct - * @covers ::resolve - * @covers ::createType */ public function testResolvingCompoundTypes(): void { @@ -285,10 +250,6 @@ public function testResolvingCompoundTypes(): void * @uses \phpDocumentor\Reflection\Types\Object_ * @uses \phpDocumentor\Reflection\Fqsen * @uses \phpDocumentor\Reflection\FqsenResolver - * - * @covers ::__construct - * @covers ::resolve - * @covers ::createType */ public function testResolvingAmpersandCompoundTypes(): void { @@ -322,10 +283,6 @@ public function testResolvingAmpersandCompoundTypes(): void * @uses \phpDocumentor\Reflection\Types\Object_ * @uses \phpDocumentor\Reflection\Fqsen * @uses \phpDocumentor\Reflection\FqsenResolver - * - * @covers ::__construct - * @covers ::resolve - * @covers ::createType */ public function testResolvingMixedCompoundTypes(): void { @@ -372,10 +329,6 @@ public function testResolvingMixedCompoundTypes(): void * @uses \phpDocumentor\Reflection\Types\Object_ * @uses \phpDocumentor\Reflection\Fqsen * @uses \phpDocumentor\Reflection\FqsenResolver - * - * @covers ::__construct - * @covers ::resolve - * @covers ::createType */ public function testResolvingCompoundTypedArrayTypes(): void { @@ -403,10 +356,6 @@ public function testResolvingCompoundTypedArrayTypes(): void * @uses \phpDocumentor\Reflection\Types\Object_ * @uses \phpDocumentor\Reflection\Fqsen * @uses \phpDocumentor\Reflection\FqsenResolver - * - * @covers ::__construct - * @covers ::resolve - * @covers ::createType */ public function testResolvingArrayExpressionObjectsTypes(): void { @@ -436,10 +385,6 @@ public function testResolvingArrayExpressionObjectsTypes(): void * @uses \phpDocumentor\Reflection\Types\Object_ * @uses \phpDocumentor\Reflection\Fqsen * @uses \phpDocumentor\Reflection\FqsenResolver - * - * @covers ::__construct - * @covers ::resolve - * @covers ::createType */ public function testResolvingArrayExpressionSimpleTypes(): void { @@ -472,10 +417,6 @@ public function testResolvingArrayExpressionSimpleTypes(): void * @uses \phpDocumentor\Reflection\Types\Object_ * @uses \phpDocumentor\Reflection\Fqsen * @uses \phpDocumentor\Reflection\FqsenResolver - * - * @covers ::__construct - * @covers ::resolve - * @covers ::createType */ public function testResolvingArrayOfArrayExpressionTypes(): void { @@ -507,10 +448,6 @@ public function testResolvingArrayOfArrayExpressionTypes(): void * @uses \phpDocumentor\Reflection\Types\Object_ * @uses \phpDocumentor\Reflection\Fqsen * @uses \phpDocumentor\Reflection\FqsenResolver - * - * @covers ::__construct - * @covers ::resolve - * @covers ::createType */ public function testReturnEmptyCompoundOnAnUnclosedArrayExpressionType(): void { @@ -526,10 +463,6 @@ public function testReturnEmptyCompoundOnAnUnclosedArrayExpressionType(): void * @uses \phpDocumentor\Reflection\Types\Object_ * @uses \phpDocumentor\Reflection\Fqsen * @uses \phpDocumentor\Reflection\FqsenResolver - * - * @covers ::__construct - * @covers ::resolve - * @covers ::createType */ public function testResolvingArrayExpressionOrCompoundTypes(): void { @@ -567,10 +500,6 @@ public function testResolvingArrayExpressionOrCompoundTypes(): void * @uses \phpDocumentor\Reflection\Types\Object_ * @uses \phpDocumentor\Reflection\Fqsen * @uses \phpDocumentor\Reflection\FqsenResolver - * - * @covers ::__construct - * @covers ::resolve - * @covers ::createType */ public function testResolvingIterableExpressionSimpleTypes(): void { @@ -609,10 +538,6 @@ public function testResolvingIterableExpressionSimpleTypes(): void * @uses \phpDocumentor\Reflection\Types\Array_ * @uses \phpDocumentor\Reflection\Types\Integer * @uses \phpDocumentor\Reflection\Types\String_ - * - * @covers ::__construct - * @covers ::resolve - * @covers ::createType */ public function testResolvingCompoundTypesWithTwoArrays(): void { @@ -637,9 +562,6 @@ public function testResolvingCompoundTypesWithTwoArrays(): void * @uses \phpDocumentor\Reflection\TypeResolver::resolve * @uses \phpDocumentor\Reflection\TypeResolver:: * @uses \phpDocumentor\Reflection\Types\Context - * - * @covers ::__construct - * @covers ::addKeyword */ public function testAddingAKeyword(): void { @@ -658,9 +580,6 @@ public function testAddingAKeyword(): void /** * @uses \phpDocumentor\Reflection\Types\Context - * - * @covers ::__construct - * @covers ::addKeyword */ public function testAddingAKeywordFailsIfTypeClassDoesNotExist(): void { @@ -671,9 +590,6 @@ public function testAddingAKeywordFailsIfTypeClassDoesNotExist(): void /** * @uses \phpDocumentor\Reflection\Types\Context - * - * @covers ::__construct - * @covers ::addKeyword */ public function testAddingAKeywordFailsIfTypeClassDoesNotImplementTypeInterface(): void { @@ -684,10 +600,6 @@ public function testAddingAKeywordFailsIfTypeClassDoesNotImplementTypeInterface( /** * @uses \phpDocumentor\Reflection\Types\Context - * - * @covers ::__construct - * @covers ::resolve - * @covers ::createType */ public function testExceptionIsThrownIfTypeIsEmpty(): void { @@ -698,10 +610,6 @@ public function testExceptionIsThrownIfTypeIsEmpty(): void /** * @uses \phpDocumentor\Reflection\Types\Context - * - * @covers ::__construct - * @covers ::resolve - * @covers ::createType */ public function testInvalidArrayOperator(): void { @@ -779,10 +687,6 @@ public function provideFqcn(): array /** * @uses \phpDocumentor\Reflection\Types\Context - * - * @covers ::__construct - * @covers ::resolve - * @covers ::createType */ public function testArrayKeyValueSpecification(): void { @@ -793,9 +697,6 @@ public function testArrayKeyValueSpecification(): void } /** - * @covers ::__construct - * @covers ::resolve - * @covers ::createType * @dataProvider typeProvider * @dataProvider genericsProvider * @dataProvider callableProvider @@ -814,9 +715,6 @@ public function testTypeBuilding(string $type, Type $expected, bool $deprecation } /** - * @covers ::__construct - * @covers ::resolve - * @covers ::createType * @dataProvider illegalLegacyFormatProvider * @testdox create type from $type */ diff --git a/tests/unit/Types/ArrayTest.php b/tests/unit/Types/ArrayTest.php index ba3ad418..3dbc95f7 100644 --- a/tests/unit/Types/ArrayTest.php +++ b/tests/unit/Types/ArrayTest.php @@ -16,17 +16,8 @@ use phpDocumentor\Reflection\Fqsen; use PHPUnit\Framework\TestCase; -/** - * @coversDefaultClass \phpDocumentor\Reflection\Types\Array_ - */ class ArrayTest extends TestCase { - /** - * @covers ::getOriginalKeyType - * @covers ::getOriginalValueType - * @covers ::getKeyType - * @covers ::getValueType - */ public function testCreateWithoutParams(): void { $type = new Array_(); @@ -37,12 +28,6 @@ public function testCreateWithoutParams(): void $this->assertEquals(new Mixed_(), $type->getValueType()); } - /** - * @covers ::getOriginalKeyType - * @covers ::getOriginalValueType - * @covers ::getKeyType - * @covers ::getValueType - */ public function testCreateWithParams(): void { $valueType = new Object_(new Fqsen('\\phpDocumentor\\Foo\\Bar')); @@ -63,7 +48,6 @@ public function testCreateWithParams(): void /** * @dataProvider provideArrays - * @covers ::__toString */ public function testArrayStringifyCorrectly(Array_ $array, string $expectedString): void { diff --git a/tests/unit/Types/BooleanTest.php b/tests/unit/Types/BooleanTest.php index 9bbf93c9..59ec11c9 100644 --- a/tests/unit/Types/BooleanTest.php +++ b/tests/unit/Types/BooleanTest.php @@ -15,14 +15,8 @@ use PHPUnit\Framework\TestCase; -/** - * @coversDefaultClass \phpDocumentor\Reflection\Types\Boolean - */ final class BooleanTest extends TestCase { - /** - * @covers ::__toString - */ public function testBooleanStringifyCorrectly(): void { $type = new Boolean(); diff --git a/tests/unit/Types/CompoundTest.php b/tests/unit/Types/CompoundTest.php index 494d423b..1a74b8f9 100644 --- a/tests/unit/Types/CompoundTest.php +++ b/tests/unit/Types/CompoundTest.php @@ -18,14 +18,8 @@ use function iterator_to_array; -/** - * @coversDefaultClass \phpDocumentor\Reflection\Types\Compound - */ final class CompoundTest extends TestCase { - /** - * @covers ::__construct - */ public function testCompoundCannotBeConstructedFromType(): void { $this->expectException(TypeError::class); @@ -36,8 +30,6 @@ public function testCompoundCannotBeConstructedFromType(): void * @uses \phpDocumentor\Reflection\Types\Compound::__construct * @uses \phpDocumentor\Reflection\Types\Compound::has * @uses \phpDocumentor\Reflection\Types\Integer - * - * @covers ::get */ public function testCompoundGetType(): void { @@ -49,8 +41,6 @@ public function testCompoundGetType(): void /** * @uses \phpDocumentor\Reflection\Types\Compound::__construct * @uses \phpDocumentor\Reflection\Types\Compound::has - * - * @covers ::get */ public function testCompoundGetNotExistingType(): void { @@ -60,8 +50,6 @@ public function testCompoundGetNotExistingType(): void /** * @uses \phpDocumentor\Reflection\Types\Compound::__construct * @uses \phpDocumentor\Reflection\Types\Integer - * - * @covers ::has */ public function testCompoundHasIndex(): void { @@ -70,8 +58,6 @@ public function testCompoundHasIndex(): void /** * @uses \phpDocumentor\Reflection\Types\Compound::__construct - * - * @covers ::has */ public function testCompoundDoesNotHasIndex(): void { @@ -81,8 +67,6 @@ public function testCompoundDoesNotHasIndex(): void /** * @uses \phpDocumentor\Reflection\Types\Compound::__construct * @uses \phpDocumentor\Reflection\Types\Integer - * - * @covers ::contains */ public function testCompoundContainsType(): void { @@ -93,8 +77,6 @@ public function testCompoundContainsType(): void * @uses \phpDocumentor\Reflection\Types\Compound::__construct * @uses \phpDocumentor\Reflection\Types\Integer * @uses \phpDocumentor\Reflection\Types\String_ - * - * @covers ::contains */ public function testCompoundDoesNotContainType(): void { @@ -104,9 +86,6 @@ public function testCompoundDoesNotContainType(): void /** * @uses \phpDocumentor\Reflection\Types\Integer * @uses \phpDocumentor\Reflection\Types\Boolean - * - * @covers ::__construct - * @covers ::__toString */ public function testCompoundCanBeConstructedAndStringifiedCorrectly(): void { @@ -116,9 +95,6 @@ public function testCompoundCanBeConstructedAndStringifiedCorrectly(): void /** * @uses \phpDocumentor\Reflection\Types\Integer * @uses \phpDocumentor\Reflection\Types\Boolean - * - * @covers ::__construct - * @covers ::__toString */ public function testCompoundDoesNotContainDuplicates(): void { @@ -132,8 +108,6 @@ public function testCompoundDoesNotContainDuplicates(): void * @uses \phpDocumentor\Reflection\Types\Compound::__construct * @uses \phpDocumentor\Reflection\Types\Integer * @uses \phpDocumentor\Reflection\Types\Boolean - * - * @covers ::getIterator */ public function testCompoundCanBeIterated(): void { @@ -147,9 +121,6 @@ public function testCompoundCanBeIterated(): void /** * @uses \phpDocumentor\Reflection\Types\Integer * @uses \phpDocumentor\Reflection\Types\Boolean - * - * @covers ::__construct - * @covers ::__toString */ public function testCompoundIsMergedWithCompound(): void { @@ -162,9 +133,6 @@ public function testCompoundIsMergedWithCompound(): void /** * @uses \phpDocumentor\Reflection\Types\Integer * @uses \phpDocumentor\Reflection\Types\Boolean - * - * @covers ::__construct - * @covers ::__toString */ public function testCompoundIsMergedOnMergedWithIntersection(): void { diff --git a/tests/unit/Types/ContextFactoryTest.php b/tests/unit/Types/ContextFactoryTest.php index eda29a6c..8e0f8122 100644 --- a/tests/unit/Types/ContextFactoryTest.php +++ b/tests/unit/Types/ContextFactoryTest.php @@ -22,14 +22,9 @@ use \ReflectionClass; use stdClass; - /** - * @coversDefaultClass \phpDocumentor\Reflection\Types\ContextFactory - */ class ContextFactoryTest extends TestCase { /** - * @covers ::createFromReflector - * @covers ::createForNamespace * @uses phpDocumentor\Reflection\Types\Context */ public function testReadsNamespaceFromClassReflection() : void @@ -41,8 +36,6 @@ public function testReadsNamespaceFromClassReflection() : void } /** - * @covers ::createFromReflector - * @covers ::createForNamespace * @uses phpDocumentor\Reflection\Types\Context */ public function testReadsAliasesFromClassReflection() : void @@ -54,7 +47,6 @@ public function testReadsAliasesFromClassReflection() : void } /** - * @covers ::createForNamespace * @uses phpDocumentor\Reflection\Types\Context */ public function testReadsNamespaceFromProvidedNamespaceAndContent() : void @@ -66,7 +58,6 @@ public function testReadsNamespaceFromProvidedNamespaceAndContent() : void } /** - * @covers ::createForNamespace * @uses phpDocumentor\Reflection\Types\Context */ public function testReadsAliasesFromProvidedNamespaceAndContent() : void @@ -78,7 +69,6 @@ public function testReadsAliasesFromProvidedNamespaceAndContent() : void } /** - * @covers ::createForNamespace * @uses phpDocumentor\Reflection\Types\Context */ public function testTraitUseIsNotDetectedAsNamespaceUse() : void @@ -100,7 +90,6 @@ class FooClass { } /** - * @covers ::createForNamespace * @uses phpDocumentor\Reflection\Types\Context */ public function testAllOpeningBracesAreCheckedWhenSearchingForEndOfClass() : void @@ -139,7 +128,6 @@ public function bar() } /** - * @covers ::createForNamespace * @uses phpDocumentor\Reflection\Types\Context */ public function testTraitContainsClosureWithUseStatement() : void @@ -167,9 +155,6 @@ class FooClass { $this->assertSame([], $context->getNamespaceAliases()); } - /** - * @covers ::createFromReflector - */ public function testEmptyFileName() : void { $fixture = new ContextFactory(); @@ -178,9 +163,6 @@ public function testEmptyFileName() : void $this->assertSame([], $context->getNamespaceAliases()); } - /** - * @covers ::createFromReflector - */ public function testEvalDClass() : void { eval(<<assertSame('My\Space', $fixture->getNamespace()); } - /** - * @covers ::__construct - * @covers ::getNamespace - */ public function testInterpretsNamespaceNamedGlobalAsRootNamespace(): void { $fixture = new Context('global'); $this->assertSame('', $fixture->getNamespace()); } - /** - * @covers ::__construct - * @covers ::getNamespace - */ public function testInterpretsNamespaceNamedDefaultAsRootNamespace(): void { $fixture = new Context('default'); $this->assertSame('', $fixture->getNamespace()); } - /** - * @covers ::__construct - * @covers ::getNamespaceAliases - */ public function testProvidesNormalizedNamespaceAliases(): void { $fixture = new Context('', ['Space' => '\My\Space']); diff --git a/tests/unit/Types/IterableTest.php b/tests/unit/Types/IterableTest.php index ebbe3f6b..72a1a84c 100644 --- a/tests/unit/Types/IterableTest.php +++ b/tests/unit/Types/IterableTest.php @@ -15,13 +15,9 @@ use PHPUnit\Framework\TestCase; -/** - * @coversDefaultClass \phpDocumentor\Reflection\Types\Iterable_ - */ class IterableTest extends TestCase { /** - * @covers ::__toString * @dataProvider provideIterables */ public function testIterableStringifyCorrectly(Iterable_ $iterable, string $expectedString): void diff --git a/tests/unit/Types/NullableTest.php b/tests/unit/Types/NullableTest.php index 1b41c6e8..401a1de1 100644 --- a/tests/unit/Types/NullableTest.php +++ b/tests/unit/Types/NullableTest.php @@ -15,15 +15,8 @@ use PHPUnit\Framework\TestCase; -/** - * @coversDefaultClass \phpDocumentor\Reflection\Types\Nullable - */ class NullableTest extends TestCase { - /** - * @covers ::__construct - * @covers ::getActualType - */ public function testNullableTypeWrapsCorrectly(): void { $realType = new String_(); @@ -33,9 +26,6 @@ public function testNullableTypeWrapsCorrectly(): void $this->assertSame($realType, $nullableString->getActualType()); } - /** - * @covers ::__toString - */ public function testNullableStringifyCorrectly(): void { $this->assertSame('?string', (string) new Nullable(new String_())); diff --git a/tests/unit/Types/SelfTest.php b/tests/unit/Types/SelfTest.php index ac7874b8..34a64ab1 100644 --- a/tests/unit/Types/SelfTest.php +++ b/tests/unit/Types/SelfTest.php @@ -7,14 +7,8 @@ use phpDocumentor\Reflection\Fqsen; use PHPUnit\Framework\TestCase; -/** - * @coversDefaultClass \phpDocumentor\Reflection\Types\Self_ - */ class SelfTest extends TestCase { - /** - * @covers ::getGenericTypes - */ public function testCreate(): void { $genericTypes = [ @@ -30,7 +24,6 @@ public function testCreate(): void /** * @dataProvider provideToStringData - * @covers ::__toString */ public function testToString(string $expectedResult, Self_ $type): void { diff --git a/tests/unit/Types/StaticTest.php b/tests/unit/Types/StaticTest.php index f41c1c03..719c32e3 100644 --- a/tests/unit/Types/StaticTest.php +++ b/tests/unit/Types/StaticTest.php @@ -7,14 +7,8 @@ use phpDocumentor\Reflection\Fqsen; use PHPUnit\Framework\TestCase; -/** - * @coversDefaultClass \phpDocumentor\Reflection\Types\Static_ - */ class StaticTest extends TestCase { - /** - * @covers ::getGenericTypes - */ public function testCreate(): void { $genericTypes = [ @@ -30,7 +24,6 @@ public function testCreate(): void /** * @dataProvider provideToStringData - * @covers ::__toString */ public function testToString(string $expectedResult, Static_ $type): void {