diff --git a/tests/AstRunner/AstMapFlattenGeneratorTest.php b/tests/AstRunner/AstMapFlattenGeneratorTest.php index 5f13d9f1a..0a168ee60 100644 --- a/tests/AstRunner/AstMapFlattenGeneratorTest.php +++ b/tests/AstRunner/AstMapFlattenGeneratorTest.php @@ -69,22 +69,22 @@ public function testBasicInheritance(): void { $astMap = $this->getAstMap('FixtureBasicInheritance'); - static::assertArrayValuesEquals( + self::assertArrayValuesEquals( [], $this->getInheritedInherits(FixtureBasicInheritanceA::class, $astMap) ); - static::assertArrayValuesEquals( + self::assertArrayValuesEquals( [], $this->getInheritedInherits(FixtureBasicInheritanceB::class, $astMap) ); - static::assertArrayValuesEquals( + self::assertArrayValuesEquals( ['Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\FixtureBasicInheritanceA::6 (Extends) (path: Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\FixtureBasicInheritanceB::7 (Extends))'], $this->getInheritedInherits(FixtureBasicInheritanceC::class, $astMap) ); - static::assertArrayValuesEquals( + self::assertArrayValuesEquals( [ 'Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\FixtureBasicInheritanceA::6 (Extends) (path: Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\FixtureBasicInheritanceC::8 (Extends) -> Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\FixtureBasicInheritanceB::7 (Extends))', 'Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\FixtureBasicInheritanceB::7 (Extends) (path: Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\FixtureBasicInheritanceC::8 (Extends))', @@ -92,7 +92,7 @@ public function testBasicInheritance(): void $this->getInheritedInherits(FixtureBasicInheritanceD::class, $astMap) ); - static::assertArrayValuesEquals( + self::assertArrayValuesEquals( [ 'Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\FixtureBasicInheritanceA::6 (Extends) (path: Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\FixtureBasicInheritanceD::9 (Extends) -> Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\FixtureBasicInheritanceC::8 (Extends) -> Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\FixtureBasicInheritanceB::7 (Extends))', 'Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\FixtureBasicInheritanceB::7 (Extends) (path: Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\FixtureBasicInheritanceD::9 (Extends) -> Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\FixtureBasicInheritanceC::8 (Extends))', @@ -106,22 +106,22 @@ public function testBasicInheritanceInterfaces(): void { $astMap = $this->getAstMap('FixtureBasicInheritanceInterfaces'); - static::assertArrayValuesEquals( + self::assertArrayValuesEquals( [], $this->getInheritedInherits(FixtureBasicInheritanceInterfaceA::class, $astMap) ); - static::assertArrayValuesEquals( + self::assertArrayValuesEquals( [], $this->getInheritedInherits(FixtureBasicInheritanceInterfaceB::class, $astMap) ); - static::assertArrayValuesEquals( + self::assertArrayValuesEquals( ['Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\FixtureBasicInheritanceInterfaceA::6 (Implements) (path: Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\FixtureBasicInheritanceInterfaceB::7 (Implements))'], $this->getInheritedInherits(FixtureBasicInheritanceInterfaceC::class, $astMap) ); - static::assertArrayValuesEquals( + self::assertArrayValuesEquals( [ 'Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\FixtureBasicInheritanceInterfaceA::6 (Implements) (path: Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\FixtureBasicInheritanceInterfaceC::8 (Implements) -> Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\FixtureBasicInheritanceInterfaceB::7 (Implements))', 'Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\FixtureBasicInheritanceInterfaceB::7 (Implements) (path: Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\FixtureBasicInheritanceInterfaceC::8 (Implements))', @@ -129,7 +129,7 @@ public function testBasicInheritanceInterfaces(): void $this->getInheritedInherits(FixtureBasicInheritanceInterfaceD::class, $astMap) ); - static::assertArrayValuesEquals( + self::assertArrayValuesEquals( [ 'Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\FixtureBasicInheritanceInterfaceA::6 (Implements) (path: Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\FixtureBasicInheritanceInterfaceD::9 (Implements) -> Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\FixtureBasicInheritanceInterfaceC::8 (Implements) -> Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\FixtureBasicInheritanceInterfaceB::7 (Implements))', 'Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\FixtureBasicInheritanceInterfaceB::7 (Implements) (path: Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\FixtureBasicInheritanceInterfaceD::9 (Implements) -> Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\FixtureBasicInheritanceInterfaceC::8 (Implements))', @@ -143,22 +143,22 @@ public function testBasicMultipleInheritanceInterfaces(): void { $astMap = $this->getAstMap('MultipleInheritanceInterfaces'); - static::assertArrayValuesEquals( + self::assertArrayValuesEquals( [], $this->getInheritedInherits(MultipleInteritanceA1::class, $astMap) ); - static::assertArrayValuesEquals( + self::assertArrayValuesEquals( [], $this->getInheritedInherits(MultipleInteritanceA2::class, $astMap) ); - static::assertArrayValuesEquals( + self::assertArrayValuesEquals( [], $this->getInheritedInherits(MultipleInteritanceA::class, $astMap) ); - static::assertArrayValuesEquals( + self::assertArrayValuesEquals( [ 'Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\MultipleInteritanceA1::7 (Implements) (path: Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\MultipleInteritanceA::8 (Implements))', 'Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\MultipleInteritanceA2::7 (Implements) (path: Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\MultipleInteritanceA::8 (Implements))', @@ -166,7 +166,7 @@ public function testBasicMultipleInheritanceInterfaces(): void $this->getInheritedInherits(MultipleInteritanceB::class, $astMap) ); - static::assertArrayValuesEquals( + self::assertArrayValuesEquals( [ 'Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\MultipleInteritanceA1::7 (Implements) (path: Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\MultipleInteritanceB::9 (Implements) -> Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\MultipleInteritanceA::8 (Implements))', 'Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\MultipleInteritanceA1::8 (Implements) (path: Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\MultipleInteritanceB::9 (Implements))', @@ -181,17 +181,17 @@ public function testBasicMultipleInheritanceWithNoise(): void { $astMap = $this->getAstMap('FixtureBasicInheritanceWithNoise'); - static::assertArrayValuesEquals( + self::assertArrayValuesEquals( [], $this->getInheritedInherits(FixtureBasicInheritanceWithNoiseA::class, $astMap) ); - static::assertArrayValuesEquals( + self::assertArrayValuesEquals( [], $this->getInheritedInherits(FixtureBasicInheritanceWithNoiseB::class, $astMap) ); - static::assertArrayValuesEquals( + self::assertArrayValuesEquals( ['Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\FixtureBasicInheritanceWithNoiseA::18 (Extends) (path: Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\FixtureBasicInheritanceWithNoiseB::19 (Extends))'], $this->getInheritedInherits(FixtureBasicInheritanceWithNoiseC::class, $astMap) ); diff --git a/tests/AstRunner/AstMapGeneratorTest.php b/tests/AstRunner/AstMapGeneratorTest.php index 128f5990c..4fbf1787d 100644 --- a/tests/AstRunner/AstMapGeneratorTest.php +++ b/tests/AstRunner/AstMapGeneratorTest.php @@ -54,7 +54,7 @@ public function testBasicDependencyClass(): void { $astMap = $this->getAstMap(__DIR__.'/Fixtures/BasicDependency/BasicDependencyClass.php'); - static::assertArrayValuesEquals( + self::assertArrayValuesEquals( [ 'Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\BasicDependency\BasicDependencyClassA::9 (Extends)', 'Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\BasicDependency\BasicDependencyClassInterfaceA::9 (Implements)', @@ -62,7 +62,7 @@ public function testBasicDependencyClass(): void $this->getInheritsAsString($astMap->getClassReferenceByClassName(ClassLikeName::fromFQCN(BasicDependencyClassB::class))) ); - static::assertArrayValuesEquals( + self::assertArrayValuesEquals( [ 'Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\BasicDependency\BasicDependencyClassInterfaceA::13 (Implements)', 'Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\BasicDependency\BasicDependencyClassInterfaceB::13 (Implements)', @@ -75,22 +75,22 @@ public function testBasicTraitsClass(): void { $astMap = $this->getAstMap(__DIR__.'/Fixtures/BasicDependency/BasicDependencyTraits.php'); - static::assertArrayValuesEquals( + self::assertArrayValuesEquals( [], $this->getInheritsAsString($astMap->getClassReferenceByClassName(ClassLikeName::fromFQCN(BasicDependencyTraitA::class))) ); - static::assertArrayValuesEquals( + self::assertArrayValuesEquals( [], $this->getInheritsAsString($astMap->getClassReferenceByClassName(ClassLikeName::fromFQCN(BasicDependencyTraitB::class))) ); - static::assertArrayValuesEquals( + self::assertArrayValuesEquals( ['Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\BasicDependency\BasicDependencyTraitB::7 (Uses)'], $this->getInheritsAsString($astMap->getClassReferenceByClassName(ClassLikeName::fromFQCN(BasicDependencyTraitC::class))) ); - static::assertArrayValuesEquals( + self::assertArrayValuesEquals( [ 'Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\BasicDependency\BasicDependencyTraitA::10 (Uses)', 'Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\BasicDependency\BasicDependencyTraitB::11 (Uses)', @@ -98,7 +98,7 @@ public function testBasicTraitsClass(): void $this->getInheritsAsString($astMap->getClassReferenceByClassName(ClassLikeName::fromFQCN(BasicDependencyTraitD::class))) ); - static::assertArrayValuesEquals( + self::assertArrayValuesEquals( ['Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\BasicDependency\BasicDependencyTraitA::15 (Uses)'], $this->getInheritsAsString($astMap->getClassReferenceByClassName(ClassLikeName::fromFQCN(BasicDependencyTraitClass::class))) ); @@ -108,7 +108,7 @@ public function testIssue319(): void { $astMap = $this->getAstMap(__DIR__.'/Fixtures/Issue319.php'); - static::assertSame( + self::assertSame( [ 'Foo\Exception', 'Foo\RuntimeException', diff --git a/tests/AstRunner/Resolver/AnnotationDependencyResolverTest.php b/tests/AstRunner/Resolver/AnnotationDependencyResolverTest.php index 6230cd54f..f61c7e76b 100644 --- a/tests/AstRunner/Resolver/AnnotationDependencyResolverTest.php +++ b/tests/AstRunner/Resolver/AnnotationDependencyResolverTest.php @@ -31,56 +31,56 @@ public function testPropertyDependencyResolving(): void $astClassReferences = $astFileReference->getAstClassReferences(); $annotationDependency = $astClassReferences[0]->getDependencies(); - static::assertCount(2, $astClassReferences); - static::assertCount(7, $annotationDependency); - static::assertCount(0, $astClassReferences[1]->getDependencies()); + self::assertCount(2, $astClassReferences); + self::assertCount(7, $annotationDependency); + self::assertCount(0, $astClassReferences[1]->getDependencies()); - static::assertSame( + self::assertSame( 'Tests\SensioLabs\Deptrac\Integration\fixtures\AnnotationDependencyChild', $annotationDependency[0]->getClassLikeName()->toString() ); - static::assertSame($filePath, $annotationDependency[0]->getFileOccurrence()->getFilepath()); - static::assertSame(9, $annotationDependency[0]->getFileOccurrence()->getLine()); - static::assertSame('variable', $annotationDependency[0]->getType()); + self::assertSame($filePath, $annotationDependency[0]->getFileOccurrence()->getFilepath()); + self::assertSame(9, $annotationDependency[0]->getFileOccurrence()->getLine()); + self::assertSame('variable', $annotationDependency[0]->getType()); - static::assertSame( + self::assertSame( 'Tests\SensioLabs\Deptrac\Integration\fixtures\AnnotationDependencyChild', $annotationDependency[1]->getClassLikeName()->toString() ); - static::assertSame($filePath, $annotationDependency[1]->getFileOccurrence()->getFilepath()); - static::assertSame(23, $annotationDependency[1]->getFileOccurrence()->getLine()); - static::assertSame('variable', $annotationDependency[1]->getType()); + self::assertSame($filePath, $annotationDependency[1]->getFileOccurrence()->getFilepath()); + self::assertSame(23, $annotationDependency[1]->getFileOccurrence()->getLine()); + self::assertSame('variable', $annotationDependency[1]->getType()); - static::assertSame( + self::assertSame( 'Tests\SensioLabs\Deptrac\Integration\fixtures\AnnotationDependencyChild', $annotationDependency[2]->getClassLikeName()->toString() ); - static::assertSame($filePath, $annotationDependency[2]->getFileOccurrence()->getFilepath()); - static::assertSame(26, $annotationDependency[2]->getFileOccurrence()->getLine()); - static::assertSame('variable', $annotationDependency[2]->getType()); + self::assertSame($filePath, $annotationDependency[2]->getFileOccurrence()->getFilepath()); + self::assertSame(26, $annotationDependency[2]->getFileOccurrence()->getLine()); + self::assertSame('variable', $annotationDependency[2]->getType()); - static::assertSame( + self::assertSame( 'Symfony\Component\Console\Exception\RuntimeException', $annotationDependency[3]->getClassLikeName()->toString() ); - static::assertSame($filePath, $annotationDependency[3]->getFileOccurrence()->getFilepath()); - static::assertSame(29, $annotationDependency[3]->getFileOccurrence()->getLine()); - static::assertSame('variable', $annotationDependency[3]->getType()); + self::assertSame($filePath, $annotationDependency[3]->getFileOccurrence()->getFilepath()); + self::assertSame(29, $annotationDependency[3]->getFileOccurrence()->getLine()); + self::assertSame('variable', $annotationDependency[3]->getType()); - static::assertSame( + self::assertSame( 'Symfony\Component\Finder\SplFileInfo', $annotationDependency[4]->getClassLikeName()->toString() ); - static::assertSame($filePath, $annotationDependency[4]->getFileOccurrence()->getFilepath()); - static::assertSame(14, $annotationDependency[4]->getFileOccurrence()->getLine()); - static::assertSame('parameter', $annotationDependency[4]->getType()); + self::assertSame($filePath, $annotationDependency[4]->getFileOccurrence()->getFilepath()); + self::assertSame(14, $annotationDependency[4]->getFileOccurrence()->getLine()); + self::assertSame('parameter', $annotationDependency[4]->getType()); - static::assertSame( + self::assertSame( 'Tests\SensioLabs\Deptrac\Integration\fixtures\AnnotationDependencyChild', $annotationDependency[5]->getClassLikeName()->toString() ); - static::assertSame($filePath, $annotationDependency[5]->getFileOccurrence()->getFilepath()); - static::assertSame(14, $annotationDependency[5]->getFileOccurrence()->getLine()); - static::assertSame('returntype', $annotationDependency[5]->getType()); + self::assertSame($filePath, $annotationDependency[5]->getFileOccurrence()->getFilepath()); + self::assertSame(14, $annotationDependency[5]->getFileOccurrence()->getLine()); + self::assertSame('returntype', $annotationDependency[5]->getType()); } } diff --git a/tests/AstRunner/Resolver/AnonymousClassResolverTest.php b/tests/AstRunner/Resolver/AnonymousClassResolverTest.php index a8e4b593b..ff6bf2c04 100644 --- a/tests/AstRunner/Resolver/AnonymousClassResolverTest.php +++ b/tests/AstRunner/Resolver/AnonymousClassResolverTest.php @@ -29,27 +29,27 @@ public function testPropertyDependencyResolving(): void $astClassReferences = $astFileReference->getAstClassReferences(); - static::assertCount(3, $astClassReferences); - static::assertCount(0, $astClassReferences[0]->getDependencies()); - static::assertCount(0, $astClassReferences[1]->getDependencies()); - static::assertCount(2, $astClassReferences[2]->getDependencies()); + self::assertCount(3, $astClassReferences); + self::assertCount(0, $astClassReferences[0]->getDependencies()); + self::assertCount(0, $astClassReferences[1]->getDependencies()); + self::assertCount(2, $astClassReferences[2]->getDependencies()); $dependencies = $astClassReferences[2]->getDependencies(); - static::assertSame( + self::assertSame( 'Tests\SensioLabs\Deptrac\AstRunner\Resolver\fixtures\ClassA', $dependencies[0]->getClassLikeName()->toString() ); - static::assertSame($filePath, $dependencies[0]->getFileOccurrence()->getFilepath()); - static::assertSame(19, $dependencies[0]->getFileOccurrence()->getLine()); - static::assertSame('anonymous_class_extends', $dependencies[0]->getType()); + self::assertSame($filePath, $dependencies[0]->getFileOccurrence()->getFilepath()); + self::assertSame(19, $dependencies[0]->getFileOccurrence()->getLine()); + self::assertSame('anonymous_class_extends', $dependencies[0]->getType()); - static::assertSame( + self::assertSame( 'Tests\SensioLabs\Deptrac\AstRunner\Resolver\fixtures\InterfaceC', $dependencies[1]->getClassLikeName()->toString() ); - static::assertSame($filePath, $dependencies[1]->getFileOccurrence()->getFilepath()); - static::assertSame(19, $dependencies[1]->getFileOccurrence()->getLine()); - static::assertSame('anonymous_class_implements', $dependencies[1]->getType()); + self::assertSame($filePath, $dependencies[1]->getFileOccurrence()->getFilepath()); + self::assertSame(19, $dependencies[1]->getFileOccurrence()->getLine()); + self::assertSame('anonymous_class_implements', $dependencies[1]->getType()); } } diff --git a/tests/AstRunner/Resolver/ClassConstantResolverTest.php b/tests/AstRunner/Resolver/ClassConstantResolverTest.php index d859217a6..b3df46932 100644 --- a/tests/AstRunner/Resolver/ClassConstantResolverTest.php +++ b/tests/AstRunner/Resolver/ClassConstantResolverTest.php @@ -29,17 +29,17 @@ public function testPropertyDependencyResolving(): void $astClassReferences = $astFileReference->getAstClassReferences(); - static::assertCount(2, $astClassReferences); - static::assertCount(0, $astClassReferences[0]->getDependencies()); - static::assertCount(1, $astClassReferences[1]->getDependencies()); + self::assertCount(2, $astClassReferences); + self::assertCount(0, $astClassReferences[0]->getDependencies()); + self::assertCount(1, $astClassReferences[1]->getDependencies()); $dependencies = $astClassReferences[1]->getDependencies(); - static::assertSame( + self::assertSame( 'Tests\SensioLabs\Deptrac\Integration\fixtures\ClassA', $dependencies[0]->getClassLikeName()->toString() ); - static::assertSame($filePath, $dependencies[0]->getFileOccurrence()->getFilepath()); - static::assertSame(15, $dependencies[0]->getFileOccurrence()->getLine()); - static::assertSame('const', $dependencies[0]->getType()); + self::assertSame($filePath, $dependencies[0]->getFileOccurrence()->getFilepath()); + self::assertSame(15, $dependencies[0]->getFileOccurrence()->getLine()); + self::assertSame('const', $dependencies[0]->getType()); } } diff --git a/tests/AstRunner/Resolver/TypeResolverTest.php b/tests/AstRunner/Resolver/TypeResolverTest.php index 5fd6b0024..ad8870a6e 100644 --- a/tests/AstRunner/Resolver/TypeResolverTest.php +++ b/tests/AstRunner/Resolver/TypeResolverTest.php @@ -43,7 +43,7 @@ public function testResolvePHPStanDocParserType(string $doc, array $types): void $typeResolver = new TypeResolver(); $resolvedTypes = $typeResolver->resolvePHPStanDocParserType($typeNode, new TypeScope('\\Test\\')); - static::assertSame($types, $resolvedTypes); + self::assertSame($types, $resolvedTypes); } public function docBlockProvider(): iterable diff --git a/tests/ClassNameLayerResolverCacheDecoratorTest.php b/tests/ClassNameLayerResolverCacheDecoratorTest.php index ba233832d..b0c8f4b6c 100644 --- a/tests/ClassNameLayerResolverCacheDecoratorTest.php +++ b/tests/ClassNameLayerResolverCacheDecoratorTest.php @@ -19,7 +19,7 @@ public function testGetLayersByClassName(): void $decorator = new ClassNameLayerResolverCacheDecorator($decorated->reveal()); - static::assertEquals(['bar'], $decorator->getLayersByClassName($classLikeName)); - static::assertEquals(['bar'], $decorator->getLayersByClassName($classLikeName)); + self::assertEquals(['bar'], $decorator->getLayersByClassName($classLikeName)); + self::assertEquals(['bar'], $decorator->getLayersByClassName($classLikeName)); } } diff --git a/tests/ClassNameLayerResolverTest.php b/tests/ClassNameLayerResolverTest.php index ea895e272..373233b63 100644 --- a/tests/ClassNameLayerResolverTest.php +++ b/tests/ClassNameLayerResolverTest.php @@ -115,7 +115,7 @@ public function testGetLayersByClassName(bool $collectA, bool $collectB1, bool $ $collectorRegistry->reveal() ); - static::assertEquals( + self::assertEquals( $expectedLayers, $resolver->getLayersByClassName(ClassLikeName::fromFQCN('classA')) ); diff --git a/tests/Collector/BoolCollectorTest.php b/tests/Collector/BoolCollectorTest.php index 4616deb4d..5fc5b88aa 100644 --- a/tests/Collector/BoolCollectorTest.php +++ b/tests/Collector/BoolCollectorTest.php @@ -28,7 +28,7 @@ public function testSatisfy(): void public function testType(): void { - static::assertEquals('bool', (new BoolCollector())->getType()); + self::assertEquals('bool', (new BoolCollector())->getType()); } private function getCalculatorMock(bool $returns) @@ -38,9 +38,9 @@ private function getCalculatorMock(bool $returns) ->method('satisfy') ->with( ['type' => $returns ? 'true' : 'false', 'foo' => 'bar'], - static::isInstanceOf(AstClassReference::class), - static::isInstanceOf(AstMap::class), - static::isInstanceOf(Registry::class) + self::isInstanceOf(AstClassReference::class), + self::isInstanceOf(AstMap::class), + self::isInstanceOf(Registry::class) ) ->willReturn($returns); @@ -179,6 +179,6 @@ public function testSatisfyBasicTest(array $configuration, bool $expected): void $collectorFactory->reveal() ); - static::assertEquals($expected, $stat); + self::assertEquals($expected, $stat); } } diff --git a/tests/Collector/ClassNameCollectorTest.php b/tests/Collector/ClassNameCollectorTest.php index 83beaf0d4..2857459d9 100644 --- a/tests/Collector/ClassNameCollectorTest.php +++ b/tests/Collector/ClassNameCollectorTest.php @@ -20,7 +20,7 @@ public function dataProviderSatisfy(): iterable public function testType(): void { - static::assertEquals('className', (new ClassNameCollector())->getType()); + self::assertEquals('className', (new ClassNameCollector())->getType()); } /** @@ -35,7 +35,7 @@ public function testSatisfy(array $configuration, string $className, bool $expec $this->prophesize(Registry::class)->reveal() ); - static::assertEquals($expected, $stat); + self::assertEquals($expected, $stat); } public function testWrongRegexParam(): void diff --git a/tests/Collector/ClassNameRegexCollectorTest.php b/tests/Collector/ClassNameRegexCollectorTest.php index 23726c6f8..c1dfc6284 100644 --- a/tests/Collector/ClassNameRegexCollectorTest.php +++ b/tests/Collector/ClassNameRegexCollectorTest.php @@ -21,7 +21,7 @@ public function dataProviderSatisfy(): iterable public function testType(): void { - static::assertEquals('classNameRegex', (new ClassNameRegexCollector())->getType()); + self::assertEquals('classNameRegex', (new ClassNameRegexCollector())->getType()); } /** @@ -36,7 +36,7 @@ public function testSatisfy(array $configuration, string $className, bool $expec $this->prophesize(Registry::class)->reveal() ); - static::assertEquals($expected, $stat); + self::assertEquals($expected, $stat); } public function testWrongRegexParam(): void diff --git a/tests/Collector/DirectoryCollectorTest.php b/tests/Collector/DirectoryCollectorTest.php index fc12eb3bc..595859f00 100644 --- a/tests/Collector/DirectoryCollectorTest.php +++ b/tests/Collector/DirectoryCollectorTest.php @@ -13,7 +13,7 @@ final class DirectoryCollectorTest extends TestCase { public function testType(): void { - static::assertSame('directory', (new DirectoryCollector())->getType()); + self::assertSame('directory', (new DirectoryCollector())->getType()); } public function dataProviderSatisfy(): iterable @@ -39,7 +39,7 @@ public function testSatisfy(array $configuration, string $filePath, bool $expect $this->createMock(Registry::class) ); - static::assertSame($expected, $stat); + self::assertSame($expected, $stat); } public function testMissingRegexThrowsException(): void diff --git a/tests/Collector/ExtendsCollectorTest.php b/tests/Collector/ExtendsCollectorTest.php index 6313726d5..e067cd60f 100644 --- a/tests/Collector/ExtendsCollectorTest.php +++ b/tests/Collector/ExtendsCollectorTest.php @@ -13,7 +13,7 @@ final class ExtendsCollectorTest extends TestCase { public function testGetType(): void { - static::assertEquals('extends', (new ExtendsCollector())->getType()); + self::assertEquals('extends', (new ExtendsCollector())->getType()); } public function dataProviderSatisfy(): iterable @@ -65,6 +65,6 @@ public function testSatisfy(array $configuration, bool $expected): void $this->createMock(Registry::class) ); - static::assertEquals($expected, $stat); + self::assertEquals($expected, $stat); } } diff --git a/tests/Collector/ImplementsCollectorTest.php b/tests/Collector/ImplementsCollectorTest.php index 1ab8f97c1..336300e7b 100644 --- a/tests/Collector/ImplementsCollectorTest.php +++ b/tests/Collector/ImplementsCollectorTest.php @@ -13,7 +13,7 @@ final class ImplementsCollectorTest extends TestCase { public function testGetType(): void { - static::assertEquals('implements', (new ImplementsCollector())->getType()); + self::assertEquals('implements', (new ImplementsCollector())->getType()); } public function dataProviderSatisfy(): iterable @@ -65,6 +65,6 @@ public function testSatisfy(array $configuration, bool $expected): void $this->createMock(Registry::class) ); - static::assertEquals($expected, $stat); + self::assertEquals($expected, $stat); } } diff --git a/tests/Collector/InheritanceLevelCollectorTest.php b/tests/Collector/InheritanceLevelCollectorTest.php index 23de2ecb8..65e382cf3 100644 --- a/tests/Collector/InheritanceLevelCollectorTest.php +++ b/tests/Collector/InheritanceLevelCollectorTest.php @@ -46,11 +46,11 @@ public function testSatisfy(int $pathLevel, int $levelConfig, bool $expected): v $this->prophesize(Registry::class)->reveal() ); - static::assertEquals($expected, $stat); + self::assertEquals($expected, $stat); } public function testType(): void { - static::assertEquals('inheritanceLevel', (new InheritanceLevelCollector())->getType()); + self::assertEquals('inheritanceLevel', (new InheritanceLevelCollector())->getType()); } } diff --git a/tests/Collector/InheritsCollectorTest.php b/tests/Collector/InheritsCollectorTest.php index 7b214feb0..9370d5847 100644 --- a/tests/Collector/InheritsCollectorTest.php +++ b/tests/Collector/InheritsCollectorTest.php @@ -13,7 +13,7 @@ final class InheritsCollectorTest extends TestCase { public function testGetType(): void { - static::assertEquals('inherits', (new InheritsCollector())->getType()); + self::assertEquals('inherits', (new InheritsCollector())->getType()); } public function dataProviderSatisfy(): iterable @@ -65,6 +65,6 @@ public function testSatisfy(array $configuration, bool $expected): void $this->createMock(Registry::class) ); - static::assertEquals($expected, $stat); + self::assertEquals($expected, $stat); } } diff --git a/tests/Collector/MethodCollectorTest.php b/tests/Collector/MethodCollectorTest.php index b49484fc6..79c520e74 100644 --- a/tests/Collector/MethodCollectorTest.php +++ b/tests/Collector/MethodCollectorTest.php @@ -17,7 +17,7 @@ final class MethodCollectorTest extends TestCase { public function testType(): void { - static::assertSame('method', (new MethodCollector($this->createMock(NikicPhpParser::class)))->getType()); + self::assertSame('method', (new MethodCollector($this->createMock(NikicPhpParser::class)))->getType()); } public function dataProviderSatisfy(): iterable @@ -73,7 +73,7 @@ public function testSatisfy(array $configuration, array $methods, bool $expected $this->createMock(Registry::class) ); - static::assertSame($expected, $stat); + self::assertSame($expected, $stat); } public function testClassLikeAstNotFoundDoesNotSatisfy(): void @@ -92,7 +92,7 @@ public function testClassLikeAstNotFoundDoesNotSatisfy(): void $this->createMock(Registry::class) ); - static::assertFalse($satisfy); + self::assertFalse($satisfy); } public function testMissingNameThrowsException(): void diff --git a/tests/Collector/RegistryTest.php b/tests/Collector/RegistryTest.php index e47b149a3..cb37063e3 100644 --- a/tests/Collector/RegistryTest.php +++ b/tests/Collector/RegistryTest.php @@ -18,7 +18,7 @@ public function testGetCollector(): void $fooCollector->getType()->willReturn('foo'); $fooCollector = $fooCollector->reveal(); - static::assertSame( + self::assertSame( $fooCollector, (new Registry([ $fooCollector, @@ -38,7 +38,7 @@ public function testGetCollectorByFQCN(): void $classNameCollector = new ClassNameCollector(); $registry = new Registry([$classNameCollector]); - static::assertSame($classNameCollector, $registry->getCollector(ClassNameCollector::class)); + self::assertSame($classNameCollector, $registry->getCollector(ClassNameCollector::class)); } public function testGetUnknownCollectorByFQCN(): void @@ -48,8 +48,8 @@ public function testGetUnknownCollectorByFQCN(): void $collector = $registry->getCollector(BoolCollector::class); - static::assertNotSame($classNameCollector, $collector); - static::assertInstanceOf(BoolCollector::class, $collector); + self::assertNotSame($classNameCollector, $collector); + self::assertInstanceOf(BoolCollector::class, $collector); } public function testGetCollectorByFQCNLoadFromCache(): void @@ -59,8 +59,8 @@ public function testGetCollectorByFQCNLoadFromCache(): void $collector = $registry->getCollector(ClassNameCollector::class); - static::assertInstanceOf(ClassNameCollector::class, $collector); - static::assertSame($collector, $registry->getCollector(ClassNameCollector::class)); + self::assertInstanceOf(ClassNameCollector::class, $collector); + self::assertSame($collector, $registry->getCollector(ClassNameCollector::class)); } public function testGetUnknownCollectorByFQCNAndThenByTypeFromCache(): void @@ -69,7 +69,7 @@ public function testGetUnknownCollectorByFQCNAndThenByTypeFromCache(): void $collector = $registry->getCollector(ClassNameCollector::class); - static::assertInstanceOf(ClassNameCollector::class, $collector); - static::assertSame($collector, $registry->getCollector('className')); + self::assertInstanceOf(ClassNameCollector::class, $collector); + self::assertSame($collector, $registry->getCollector('className')); } } diff --git a/tests/Collector/UsesCollectorTest.php b/tests/Collector/UsesCollectorTest.php index b8caaae0e..1cd785b6a 100644 --- a/tests/Collector/UsesCollectorTest.php +++ b/tests/Collector/UsesCollectorTest.php @@ -13,7 +13,7 @@ final class UsesCollectorTest extends TestCase { public function testGetType(): void { - static::assertEquals('uses', (new UsesCollector())->getType()); + self::assertEquals('uses', (new UsesCollector())->getType()); } public function dataProviderSatisfy(): iterable @@ -65,6 +65,6 @@ public function testSatisfy(array $configuration, bool $expected): void $this->createMock(Registry::class) ); - static::assertEquals($expected, $stat); + self::assertEquals($expected, $stat); } } diff --git a/tests/Configuration/ConfigurationCollectorTest.php b/tests/Configuration/ConfigurationCollectorTest.php index a3dcdf2a2..366fe53fc 100644 --- a/tests/Configuration/ConfigurationCollectorTest.php +++ b/tests/Configuration/ConfigurationCollectorTest.php @@ -23,7 +23,7 @@ public function testFromArray(): void 'abc' => 'def', ]); - static::assertEquals('foo', $configurationCollector->getType()); - static::assertEquals($args, $configurationCollector->getArgs()); + self::assertEquals('foo', $configurationCollector->getType()); + self::assertEquals($args, $configurationCollector->getArgs()); } } diff --git a/tests/Configuration/ConfigurationLayerTest.php b/tests/Configuration/ConfigurationLayerTest.php index 49f427e95..a7b05016b 100644 --- a/tests/Configuration/ConfigurationLayerTest.php +++ b/tests/Configuration/ConfigurationLayerTest.php @@ -19,11 +19,11 @@ public function testFromArray(): void ], ]); - static::assertEquals('some_name', $configurationLayer->getName()); - static::assertCount(2, $configurationLayer->getCollectors()); - static::assertEquals('foo1', $configurationLayer->getCollectors()[0]->getType()); - static::assertEquals(['type' => 'foo1', 'foo' => 'bar'], $configurationLayer->getCollectors()[0]->getArgs()); - static::assertEquals('foo2', $configurationLayer->getCollectors()[1]->getType()); - static::assertEquals(['type' => 'foo2', 'foo' => 'bar'], $configurationLayer->getCollectors()[1]->getArgs()); + self::assertEquals('some_name', $configurationLayer->getName()); + self::assertCount(2, $configurationLayer->getCollectors()); + self::assertEquals('foo1', $configurationLayer->getCollectors()[0]->getType()); + self::assertEquals(['type' => 'foo1', 'foo' => 'bar'], $configurationLayer->getCollectors()[0]->getArgs()); + self::assertEquals('foo2', $configurationLayer->getCollectors()[1]->getType()); + self::assertEquals(['type' => 'foo2', 'foo' => 'bar'], $configurationLayer->getCollectors()[1]->getArgs()); } } diff --git a/tests/Configuration/ConfigurationRulesetTest.php b/tests/Configuration/ConfigurationRulesetTest.php index 315cce8b5..b234384ac 100644 --- a/tests/Configuration/ConfigurationRulesetTest.php +++ b/tests/Configuration/ConfigurationRulesetTest.php @@ -15,8 +15,8 @@ public function testFromArray(): void ['foo' => ['bar'], 'lala' => ['xx', 'yy']] ); - static::assertEquals(['bar'], $configurationRuleSet->getAllowedDependencies('foo')); - static::assertEquals(['xx', 'yy'], $configurationRuleSet->getAllowedDependencies('lala')); - static::assertEquals([], $configurationRuleSet->getAllowedDependencies('lalax')); + self::assertEquals(['bar'], $configurationRuleSet->getAllowedDependencies('foo')); + self::assertEquals(['xx', 'yy'], $configurationRuleSet->getAllowedDependencies('lala')); + self::assertEquals([], $configurationRuleSet->getAllowedDependencies('lalax')); } } diff --git a/tests/Configuration/ConfigurationSkippedViolationTest.php b/tests/Configuration/ConfigurationSkippedViolationTest.php index 9d286301b..b4f2a1d29 100644 --- a/tests/Configuration/ConfigurationSkippedViolationTest.php +++ b/tests/Configuration/ConfigurationSkippedViolationTest.php @@ -23,16 +23,16 @@ public function testFromArray(): void 'DependencyClass2', ], ]); - static::assertTrue($configuration->isViolationSkipped(ClassLikeName::fromFQCN('ClassWithOneDep'), ClassLikeName::fromFQCN('DependencyClass'))); - static::assertFalse($configuration->isViolationSkipped(ClassLikeName::fromFQCN('ClassWithEmptyDeps'), ClassLikeName::fromFQCN('DependencyClass'))); - static::assertTrue($configuration->isViolationSkipped(ClassLikeName::fromFQCN('ClassWithMultipleDeps'), ClassLikeName::fromFQCN('DependencyClass1'))); - static::assertTrue($configuration->isViolationSkipped(ClassLikeName::fromFQCN('ClassWithMultipleDeps'), ClassLikeName::fromFQCN('DependencyClass2'))); + self::assertTrue($configuration->isViolationSkipped(ClassLikeName::fromFQCN('ClassWithOneDep'), ClassLikeName::fromFQCN('DependencyClass'))); + self::assertFalse($configuration->isViolationSkipped(ClassLikeName::fromFQCN('ClassWithEmptyDeps'), ClassLikeName::fromFQCN('DependencyClass'))); + self::assertTrue($configuration->isViolationSkipped(ClassLikeName::fromFQCN('ClassWithMultipleDeps'), ClassLikeName::fromFQCN('DependencyClass1'))); + self::assertTrue($configuration->isViolationSkipped(ClassLikeName::fromFQCN('ClassWithMultipleDeps'), ClassLikeName::fromFQCN('DependencyClass2'))); } public function testFromArrayWithEmptyArrayAcceptable(): void { $configuration = ConfigurationSkippedViolation::fromArray([]); - static::assertFalse($configuration->isViolationSkipped(ClassLikeName::fromFQCN('AnyClass'), ClassLikeName::fromFQCN('AnotherAnyClass'))); + self::assertFalse($configuration->isViolationSkipped(ClassLikeName::fromFQCN('AnyClass'), ClassLikeName::fromFQCN('AnotherAnyClass'))); } public function testFromArrayRequireOneArgument(): void diff --git a/tests/Configuration/ConfigurationTest.php b/tests/Configuration/ConfigurationTest.php index 870c5feb2..68a0cb27f 100644 --- a/tests/Configuration/ConfigurationTest.php +++ b/tests/Configuration/ConfigurationTest.php @@ -36,12 +36,12 @@ public function testFromArray(): void ], ]); - static::assertCount(2, $configuration->getLayers()); - static::assertEquals('some_name', $configuration->getLayers()[0]->getName()); - static::assertEquals(['foo', 'bar'], $configuration->getPaths()); - static::assertEquals(['foo2', 'bar2'], $configuration->getExcludeFiles()); - static::assertEquals(['xx', 'yy'], $configuration->getRuleset()->getAllowedDependencies('lala')); - static::assertTrue($configuration->ignoreUncoveredInternalClasses()); + self::assertCount(2, $configuration->getLayers()); + self::assertEquals('some_name', $configuration->getLayers()[0]->getName()); + self::assertEquals(['foo', 'bar'], $configuration->getPaths()); + self::assertEquals(['foo2', 'bar2'], $configuration->getExcludeFiles()); + self::assertEquals(['xx', 'yy'], $configuration->getRuleset()->getAllowedDependencies('lala')); + self::assertTrue($configuration->ignoreUncoveredInternalClasses()); } public function testExcludedFilesAreOptional(): void @@ -66,7 +66,7 @@ public function testExcludedFilesAreOptional(): void ], ]); - static::assertSame([], $configuration->getExcludeFiles()); + self::assertSame([], $configuration->getExcludeFiles()); } public function testFromWithNullExcludeFiles(): void @@ -78,7 +78,7 @@ public function testFromWithNullExcludeFiles(): void 'ruleset' => [], ]); - static::assertEquals([], $configuration->getExcludeFiles()); + self::assertEquals([], $configuration->getExcludeFiles()); } public function testSkipViolations(): void @@ -96,8 +96,8 @@ public function testSkipViolations(): void ], ]); - static::assertTrue($configuration->getSkipViolations()->isViolationSkipped(ClassLikeName::fromFQCN('FooClass'), ClassLikeName::fromFQCN('BarClass'))); - static::assertTrue($configuration->getSkipViolations()->isViolationSkipped(ClassLikeName::fromFQCN('FooClass'), ClassLikeName::fromFQCN('AnotherClass'))); + self::assertTrue($configuration->getSkipViolations()->isViolationSkipped(ClassLikeName::fromFQCN('FooClass'), ClassLikeName::fromFQCN('BarClass'))); + self::assertTrue($configuration->getSkipViolations()->isViolationSkipped(ClassLikeName::fromFQCN('FooClass'), ClassLikeName::fromFQCN('AnotherClass'))); } public function testIgnoreUncoveredInternalClassesSetToFalse(): void @@ -109,6 +109,6 @@ public function testIgnoreUncoveredInternalClassesSetToFalse(): void 'ignore_uncovered_internal_classes' => false, ]); - static::assertFalse($configuration->ignoreUncoveredInternalClasses()); + self::assertFalse($configuration->ignoreUncoveredInternalClasses()); } } diff --git a/tests/Dependency/DependencyTest.php b/tests/Dependency/DependencyTest.php index 72c746ba6..d61b9583a 100644 --- a/tests/Dependency/DependencyTest.php +++ b/tests/Dependency/DependencyTest.php @@ -18,9 +18,9 @@ public function testGetSet(): void ClassLikeName::fromFQCN('b'), FileOccurrence::fromFilepath('/foo.php', 23) ); - static::assertSame('a', $dependency->getClassLikeNameA()->toString()); - static::assertSame('/foo.php', $dependency->getFileOccurrence()->getFilepath()); - static::assertSame(23, $dependency->getFileOccurrence()->getLine()); - static::assertSame('b', $dependency->getClassLikeNameB()->toString()); + self::assertSame('a', $dependency->getClassLikeNameA()->toString()); + self::assertSame('/foo.php', $dependency->getFileOccurrence()->getFilepath()); + self::assertSame(23, $dependency->getFileOccurrence()->getLine()); + self::assertSame('b', $dependency->getClassLikeNameB()->toString()); } } diff --git a/tests/Dependency/InheritDependencyTest.php b/tests/Dependency/InheritDependencyTest.php index 0f449f67c..cbb6a4140 100644 --- a/tests/Dependency/InheritDependencyTest.php +++ b/tests/Dependency/InheritDependencyTest.php @@ -26,10 +26,10 @@ public function testGetSet(): void $astInherit = AstInherit::newExtends($classLikeNameB, $fileOccurrence) ); - static::assertSame($classLikeNameA, $dependency->getClassLikeNameA()); - static::assertSame($classLikeNameB, $dependency->getClassLikeNameB()); - static::assertSame(1, $dependency->getFileOccurrence()->getLine()); - static::assertSame($dep, $dependency->getOriginalDependency()); - static::assertSame($astInherit, $dependency->getInheritPath()); + self::assertSame($classLikeNameA, $dependency->getClassLikeNameA()); + self::assertSame($classLikeNameB, $dependency->getClassLikeNameB()); + self::assertSame(1, $dependency->getFileOccurrence()->getLine()); + self::assertSame($dep, $dependency->getOriginalDependency()); + self::assertSame($astInherit, $dependency->getInheritPath()); } } diff --git a/tests/Dependency/InheritanceFlatterTest.php b/tests/Dependency/InheritanceFlatterTest.php index d8bb271f4..81cbd9850 100644 --- a/tests/Dependency/InheritanceFlatterTest.php +++ b/tests/Dependency/InheritanceFlatterTest.php @@ -74,6 +74,6 @@ static function ($v) { } ); - static::assertCount(2, $inheritDeps); + self::assertCount(2, $inheritDeps); } } diff --git a/tests/Dependency/ResolverTest.php b/tests/Dependency/ResolverTest.php index bb21cbfee..cec3c860e 100644 --- a/tests/Dependency/ResolverTest.php +++ b/tests/Dependency/ResolverTest.php @@ -30,11 +30,11 @@ public function testResolve(): void ); $inheritanceFlatter = $this->createMock(InheritanceFlatter::class); - $inheritanceFlatter->expects(static::once())->method('flattenDependencies'); + $inheritanceFlatter->expects(self::once())->method('flattenDependencies'); $emitter = $this->createMock(DependencyEmitterInterface::class); $emitter->method('getName')->willReturn('emitter'); - $emitter->expects(static::once())->method('applyDependencies'); + $emitter->expects(self::once())->method('applyDependencies'); $resolver = new Resolver($dispatcher, $inheritanceFlatter, [$emitter]); $resolver->resolve($astMap); diff --git a/tests/Dependency/ResultTest.php b/tests/Dependency/ResultTest.php index 86e0a8003..0d7a90126 100644 --- a/tests/Dependency/ResultTest.php +++ b/tests/Dependency/ResultTest.php @@ -24,10 +24,10 @@ public function testAddDependency(): void $dependencyResult->addDependency($dep1 = new Dependency($classA, $classB, FileOccurrence::fromFilepath('a.php', 12))); $dependencyResult->addDependency($dep2 = new Dependency($classB, $classC, FileOccurrence::fromFilepath('b.php', 12))); $dependencyResult->addDependency($dep3 = new Dependency($classA, $classC, FileOccurrence::fromFilepath('a.php', 12))); - static::assertSame([$dep1, $dep3], $dependencyResult->getDependenciesByClass($classA)); - static::assertSame([$dep2], $dependencyResult->getDependenciesByClass($classB)); - static::assertSame([], $dependencyResult->getDependenciesByClass($classC)); - static::assertCount(3, $dependencyResult->getDependenciesAndInheritDependencies()); + self::assertSame([$dep1, $dep3], $dependencyResult->getDependenciesByClass($classA)); + self::assertSame([$dep2], $dependencyResult->getDependenciesByClass($classB)); + self::assertSame([], $dependencyResult->getDependenciesByClass($classC)); + self::assertCount(3, $dependencyResult->getDependenciesAndInheritDependencies()); } public function testGetDependenciesAndInheritDependencies(): void @@ -38,6 +38,6 @@ public function testGetDependenciesAndInheritDependencies(): void $dependencyResult = new Result(); $dependencyResult->addDependency($dep1 = new Dependency($classA, $classB, FileOccurrence::fromFilepath('a.php', 12))); $dependencyResult->addInheritDependency($dep2 = new InheritDependency($classA, $classB, $dep1, AstInherit::newExtends($classB, FileOccurrence::fromFilepath('a.php', 12)))); - static::assertEquals([$dep1, $dep2], $dependencyResult->getDependenciesAndInheritDependencies()); + self::assertEquals([$dep1, $dep2], $dependencyResult->getDependenciesAndInheritDependencies()); } } diff --git a/tests/DependencyEmitter/BasicDependencyEmitterTest.php b/tests/DependencyEmitter/BasicDependencyEmitterTest.php index ca5e75733..444ba30c8 100644 --- a/tests/DependencyEmitter/BasicDependencyEmitterTest.php +++ b/tests/DependencyEmitter/BasicDependencyEmitterTest.php @@ -13,7 +13,7 @@ final class BasicDependencyEmitterTest extends TestCase public function testGetName(): void { - static::assertEquals('BasicDependencyEmitter', (new BasicDependencyEmitter())->getName()); + self::assertEquals('BasicDependencyEmitter', (new BasicDependencyEmitter())->getName()); } public function testApplyDependencies(): void @@ -23,20 +23,20 @@ public function testApplyDependencies(): void new \SplFileInfo(__DIR__.'/Fixtures/Foo.php') ); - static::assertCount(15, $deps); - static::assertContains('Foo\Bar:4 on SomeUse', $deps); - static::assertContains('Foo\Bar:10 on Foo\SomeParam', $deps); - static::assertContains('Foo\Bar:10 on Foo\SomeClass', $deps); - static::assertContains('Foo\Bar:12 on Foo\SomeClass', $deps); - static::assertContains('Foo\Bar:13 on SomeOtherClass', $deps); - static::assertContains('Foo\Bar:15 on Foo\SomeOtherParam', $deps); - static::assertContains('Foo\Bar:19 on Foo\SomeInstanceOf', $deps); - static::assertContains('Foo\Bar:21 on Foo\SomeClass', $deps); - static::assertContains('Foo\Bar:23 on Foo\SomeClass', $deps); - static::assertContains('Foo\Bar:26 on Some\NamespacedClass', $deps); - static::assertContains('Foo\Bar:30 on Foo\SomeClass', $deps); - static::assertContains('Foo\Bar:32 on Foo\SomeClass', $deps); - static::assertContains('Foo\Bar:36 on Foo\string2', $deps); - static::assertContains('Foo\Bar:42 on Foo\SomeClass', $deps); + self::assertCount(15, $deps); + self::assertContains('Foo\Bar:4 on SomeUse', $deps); + self::assertContains('Foo\Bar:10 on Foo\SomeParam', $deps); + self::assertContains('Foo\Bar:10 on Foo\SomeClass', $deps); + self::assertContains('Foo\Bar:12 on Foo\SomeClass', $deps); + self::assertContains('Foo\Bar:13 on SomeOtherClass', $deps); + self::assertContains('Foo\Bar:15 on Foo\SomeOtherParam', $deps); + self::assertContains('Foo\Bar:19 on Foo\SomeInstanceOf', $deps); + self::assertContains('Foo\Bar:21 on Foo\SomeClass', $deps); + self::assertContains('Foo\Bar:23 on Foo\SomeClass', $deps); + self::assertContains('Foo\Bar:26 on Some\NamespacedClass', $deps); + self::assertContains('Foo\Bar:30 on Foo\SomeClass', $deps); + self::assertContains('Foo\Bar:32 on Foo\SomeClass', $deps); + self::assertContains('Foo\Bar:36 on Foo\string2', $deps); + self::assertContains('Foo\Bar:42 on Foo\SomeClass', $deps); } } diff --git a/tests/DependencyEmitter/InheritanceDependencyEmitterTest.php b/tests/DependencyEmitter/InheritanceDependencyEmitterTest.php index ec3be3673..612176fd6 100644 --- a/tests/DependencyEmitter/InheritanceDependencyEmitterTest.php +++ b/tests/DependencyEmitter/InheritanceDependencyEmitterTest.php @@ -13,7 +13,7 @@ final class InheritanceDependencyEmitterTest extends TestCase public function testGetName(): void { - static::assertEquals('InheritanceDependencyEmitter', (new InheritanceDependencyEmitter())->getName()); + self::assertEquals('InheritanceDependencyEmitter', (new InheritanceDependencyEmitter())->getName()); } public function testApplyDependencies(): void @@ -23,10 +23,10 @@ public function testApplyDependencies(): void new \SplFileInfo(__DIR__.'/Fixtures/Foo.php') ); - static::assertCount(4, $deps); - static::assertContains('Foo\Bar:6 on Foo\BarExtends', $deps); - static::assertContains('Foo\Bar:6 on Foo\BarInterface1', $deps); - static::assertContains('Foo\Bar:6 on BarInterface2', $deps); - static::assertContains('Foo\Bar:8 on Foo\SomeTrait', $deps); + self::assertCount(4, $deps); + self::assertContains('Foo\Bar:6 on Foo\BarExtends', $deps); + self::assertContains('Foo\Bar:6 on Foo\BarInterface1', $deps); + self::assertContains('Foo\Bar:6 on BarInterface2', $deps); + self::assertContains('Foo\Bar:8 on Foo\SomeTrait', $deps); } } diff --git a/tests/OutputFormatter/ConsoleOutputFormatterTest.php b/tests/OutputFormatter/ConsoleOutputFormatterTest.php index 419d3f3ed..6a284d44c 100644 --- a/tests/OutputFormatter/ConsoleOutputFormatterTest.php +++ b/tests/OutputFormatter/ConsoleOutputFormatterTest.php @@ -27,7 +27,7 @@ final class ConsoleOutputFormatterTest extends TestCase { public function testGetName(): void { - static::assertEquals('console', (new ConsoleOutputFormatter(new EmptyEnv()))->getName()); + self::assertEquals('console', (new ConsoleOutputFormatter(new EmptyEnv()))->getName()); } public function basicDataProvider(): iterable @@ -160,7 +160,7 @@ public function testBasic(array $rules, string $expectedOutput): void ); $o = $bufferedOutput->fetch(); - static::assertEquals( + self::assertEquals( $this->normalize($expectedOutput), $this->normalize($o) ); @@ -168,7 +168,7 @@ public function testBasic(array $rules, string $expectedOutput): void public function testGetOptions(): void { - static::assertCount(1, (new ConsoleOutputFormatter(new EmptyEnv()))->configureOptions()); + self::assertCount(1, (new ConsoleOutputFormatter(new EmptyEnv()))->configureOptions()); } private function normalize($str) @@ -178,6 +178,6 @@ private function normalize($str) public function testConsoleOutputFormatterIsEnabledByDefault(): void { - static::assertTrue((new ConsoleOutputFormatter(new EmptyEnv()))->enabledByDefault()); + self::assertTrue((new ConsoleOutputFormatter(new EmptyEnv()))->enabledByDefault()); } } diff --git a/tests/OutputFormatter/GithubActionsOutputFormatterTest.php b/tests/OutputFormatter/GithubActionsOutputFormatterTest.php index a9995e97a..4104996e1 100644 --- a/tests/OutputFormatter/GithubActionsOutputFormatterTest.php +++ b/tests/OutputFormatter/GithubActionsOutputFormatterTest.php @@ -23,7 +23,7 @@ final class GithubActionsOutputFormatterTest extends TestCase { public function testGetName() { - static::assertEquals('github-actions', (new GithubActionsOutputFormatter())->getName()); + self::assertEquals('github-actions', (new GithubActionsOutputFormatter())->getName()); } /** @@ -40,7 +40,7 @@ public function testFinish(array $rules, string $expectedOutput): void new OutputFormatterInput(['report-uncovered' => true]) ); - static::assertEquals($expectedOutput, $bufferedOutput->fetch()); + self::assertEquals($expectedOutput, $bufferedOutput->fetch()); } public function finishProvider() @@ -89,12 +89,12 @@ public function finishProvider() public function testGithubActionsOutputFormatterIsNotEnabledByDefault(): void { - static::assertFalse((new GithubActionsOutputFormatter(new EmptyEnv()))->enabledByDefault()); + self::assertFalse((new GithubActionsOutputFormatter(new EmptyEnv()))->enabledByDefault()); } public function testGetOptions(): void { - static::assertCount(1, (new GithubActionsOutputFormatter(new EmptyEnv()))->configureOptions()); + self::assertCount(1, (new GithubActionsOutputFormatter(new EmptyEnv()))->configureOptions()); } private function createSymfonyOutput(BufferedOutput $bufferedOutput): SymfonyOutput diff --git a/tests/OutputFormatter/GraphVizOutputFormatterTest.php b/tests/OutputFormatter/GraphVizOutputFormatterTest.php index aa8615119..8a136bfae 100644 --- a/tests/OutputFormatter/GraphVizOutputFormatterTest.php +++ b/tests/OutputFormatter/GraphVizOutputFormatterTest.php @@ -24,7 +24,7 @@ final class GraphVizOutputFormatterTest extends TestCase { public function testGetName(): void { - static::assertEquals('graphviz', (new GraphVizOutputFormatter())->getName()); + self::assertEquals('graphviz', (new GraphVizOutputFormatter())->getName()); } public function testFinish(): void @@ -51,8 +51,8 @@ public function testFinish(): void (new GraphVizOutputFormatter())->finish($context, $this->createSymfonyOutput($bufferedOutput), $input); - static::assertSame(sprintf("Script dumped to %s\n", $dotFile), $bufferedOutput->fetch()); - static::assertFileEquals(__DIR__.'/data/graphviz-expected.dot', $dotFile); + self::assertSame(sprintf("Script dumped to %s\n", $dotFile), $bufferedOutput->fetch()); + self::assertFileEquals(__DIR__.'/data/graphviz-expected.dot', $dotFile); unlink($dotFile); } diff --git a/tests/OutputFormatter/JUnitOutputFormatterTest.php b/tests/OutputFormatter/JUnitOutputFormatterTest.php index 4dd2265f0..235caf77f 100644 --- a/tests/OutputFormatter/JUnitOutputFormatterTest.php +++ b/tests/OutputFormatter/JUnitOutputFormatterTest.php @@ -27,14 +27,14 @@ final class JUnitOutputFormatterTest extends TestCase public function tearDown(): void { - if (file_exists(__DIR__.'/data/'.static::$actual_junit_report_file)) { - unlink(__DIR__.'/data/'.static::$actual_junit_report_file); + if (file_exists(__DIR__.'/data/'.self::$actual_junit_report_file)) { + unlink(__DIR__.'/data/'.self::$actual_junit_report_file); } } public function testGetName(): void { - static::assertSame('junit', (new JUnitOutputFormatter())->getName()); + self::assertSame('junit', (new JUnitOutputFormatter())->getName()); } public function basicDataProvider(): iterable @@ -126,18 +126,18 @@ public function testBasic(array $rules, string $expectedOutputFile): void $formatter->finish( new Context($rules), $this->createSymfonyOutput(new BufferedOutput()), - new OutputFormatterInput(['dump-xml' => __DIR__.'/data/'.static::$actual_junit_report_file]) + new OutputFormatterInput(['dump-xml' => __DIR__.'/data/'.self::$actual_junit_report_file]) ); - static::assertXmlFileEqualsXmlFile( - __DIR__.'/data/'.static::$actual_junit_report_file, + self::assertXmlFileEqualsXmlFile( + __DIR__.'/data/'.self::$actual_junit_report_file, __DIR__.'/data/'.$expectedOutputFile ); } public function testGetOptions(): void { - static::assertCount(1, (new JUnitOutputFormatter())->configureOptions()); + self::assertCount(1, (new JUnitOutputFormatter())->configureOptions()); } private function createSymfonyOutput(BufferedOutput $bufferedOutput): SymfonyOutput diff --git a/tests/OutputFormatter/OutputFormatterInputTest.php b/tests/OutputFormatter/OutputFormatterInputTest.php index c5695cbcf..68392009b 100644 --- a/tests/OutputFormatter/OutputFormatterInputTest.php +++ b/tests/OutputFormatter/OutputFormatterInputTest.php @@ -11,13 +11,13 @@ final class OutputFormatterInputTest extends TestCase { public function testGetOption(): void { - static::assertEquals('b', (new OutputFormatterInput(['a' => 'b']))->getOption('a')); + self::assertEquals('b', (new OutputFormatterInput(['a' => 'b']))->getOption('a')); } public function testGetOptionAsBoolean(): void { - static::assertTrue((new OutputFormatterInput(['a' => '1']))->getOptionAsBoolean('a')); - static::assertFalse((new OutputFormatterInput(['a' => '0']))->getOptionAsBoolean('a')); + self::assertTrue((new OutputFormatterInput(['a' => '1']))->getOptionAsBoolean('a')); + self::assertFalse((new OutputFormatterInput(['a' => '0']))->getOptionAsBoolean('a')); } public function testGetOptionException(): void diff --git a/tests/OutputFormatter/OutputFormatterOptionTest.php b/tests/OutputFormatter/OutputFormatterOptionTest.php index 49d925c9c..4c3002948 100644 --- a/tests/OutputFormatter/OutputFormatterOptionTest.php +++ b/tests/OutputFormatter/OutputFormatterOptionTest.php @@ -12,9 +12,9 @@ final class OutputFormatterOptionTest extends TestCase public function testGetSet(): void { $formatterOption = OutputFormatterOption::newValueOption('name', 'desc', 'default'); - static::assertEquals('name', $formatterOption->getName()); - static::assertEquals(4, $formatterOption->getMode()); - static::assertEquals('desc', $formatterOption->getDescription()); - static::assertEquals('default', $formatterOption->getDefault()); + self::assertEquals('name', $formatterOption->getName()); + self::assertEquals(4, $formatterOption->getMode()); + self::assertEquals('desc', $formatterOption->getDescription()); + self::assertEquals('default', $formatterOption->getDefault()); } } diff --git a/tests/OutputFormatter/XMLOutputFormatterTest.php b/tests/OutputFormatter/XMLOutputFormatterTest.php index 6653a9058..a75f8773f 100644 --- a/tests/OutputFormatter/XMLOutputFormatterTest.php +++ b/tests/OutputFormatter/XMLOutputFormatterTest.php @@ -28,14 +28,14 @@ final class XMLOutputFormatterTest extends TestCase public function tearDown(): void { - if (file_exists(__DIR__.'/data/'.static::$actual_xml_report_file)) { - unlink(__DIR__.'/data/'.static::$actual_xml_report_file); + if (file_exists(__DIR__.'/data/'.self::$actual_xml_report_file)) { + unlink(__DIR__.'/data/'.self::$actual_xml_report_file); } } public function testGetName(): void { - static::assertSame('xml', (new XMLOutputFormatter())->getName()); + self::assertSame('xml', (new XMLOutputFormatter())->getName()); } public function basicDataProvider(): iterable @@ -122,18 +122,18 @@ public function testBasic(array $rules, $expectedOutputFile): void $formatter->finish( new Context($rules), $this->createSymfonyOutput($bufferedOutput), - new OutputFormatterInput(['dump-xml' => __DIR__.'/data/'.static::$actual_xml_report_file]) + new OutputFormatterInput(['dump-xml' => __DIR__.'/data/'.self::$actual_xml_report_file]) ); - static::assertXmlFileEqualsXmlFile( - __DIR__.'/data/'.static::$actual_xml_report_file, + self::assertXmlFileEqualsXmlFile( + __DIR__.'/data/'.self::$actual_xml_report_file, __DIR__.'/data/'.$expectedOutputFile ); } public function testGetOptions(): void { - static::assertCount(1, (new JUnitOutputFormatter())->configureOptions()); + self::assertCount(1, (new JUnitOutputFormatter())->configureOptions()); } private function createSymfonyOutput(BufferedOutput $bufferedOutput): SymfonyOutput diff --git a/tests/OutputFormatterFactoryTest.php b/tests/OutputFormatterFactoryTest.php index 2fce515cd..bb426c97f 100644 --- a/tests/OutputFormatterFactoryTest.php +++ b/tests/OutputFormatterFactoryTest.php @@ -28,8 +28,8 @@ public function testGetFormatterByName(): void $formatter2 = $this->createNamedFormatter('formatter2'), ]); - static::assertSame($formatter1, $formatterFactory->getFormatterByName('formatter1')); - static::assertSame($formatter2, $formatterFactory->getFormatterByName('formatter2')); + self::assertSame($formatter1, $formatterFactory->getFormatterByName('formatter1')); + self::assertSame($formatter2, $formatterFactory->getFormatterByName('formatter2')); } public function testGetFormatterOptions(): void @@ -63,23 +63,23 @@ public function testGetFormatterOptions(): void /** @var $arguments InputArgument[] */ $arguments = $formatterFactory->getFormatterOptions('foo1'); - static::assertEquals('formatter-foo1', $arguments[0]->getName()); + self::assertEquals('formatter-foo1', $arguments[0]->getName()); - static::assertEquals('formatter-foo1-f1-n1', $arguments[1]->getName()); - static::assertEquals('f1-n1-default', $arguments[1]->getDefault()); - static::assertEquals('f1-n1-desc', $arguments[1]->getDescription()); + self::assertEquals('formatter-foo1-f1-n1', $arguments[1]->getName()); + self::assertEquals('f1-n1-default', $arguments[1]->getDefault()); + self::assertEquals('f1-n1-desc', $arguments[1]->getDescription()); - static::assertEquals('formatter-foo2', $arguments[2]->getName()); + self::assertEquals('formatter-foo2', $arguments[2]->getName()); - static::assertEquals('formatter-foo2-f2-n1', $arguments[3]->getName()); - static::assertEquals('f2-n1-default', $arguments[3]->getDefault()); - static::assertEquals('f2-n1-desc', $arguments[3]->getDescription()); + self::assertEquals('formatter-foo2-f2-n1', $arguments[3]->getName()); + self::assertEquals('f2-n1-default', $arguments[3]->getDefault()); + self::assertEquals('f2-n1-desc', $arguments[3]->getDescription()); - static::assertEquals('formatter-foo2-f2-n2', $arguments[4]->getName()); - static::assertEquals('f2-n2-default', $arguments[4]->getDefault()); - static::assertEquals('f2-n2-desc', $arguments[4]->getDescription()); + self::assertEquals('formatter-foo2-f2-n2', $arguments[4]->getName()); + self::assertEquals('f2-n2-default', $arguments[4]->getDefault()); + self::assertEquals('f2-n2-desc', $arguments[4]->getDescription()); - static::assertCount(6, $arguments); + self::assertCount(6, $arguments); } public function testIsFormatterActive(): void @@ -95,7 +95,7 @@ public function testIsFormatterActive(): void $input->getOption('formatter-f2')->willReturn(true); $input->getOption('formatter-f3')->willReturn(false); - static::assertCount(2, $formatter->getActiveFormatters($input->reveal())); + self::assertCount(2, $formatter->getActiveFormatters($input->reveal())); } public function testGetOutputFormatterInput(): void @@ -112,7 +112,7 @@ public function testGetOutputFormatterInput(): void 'formatter-f3' => '', ]); - static::assertEquals('jupp', $formatter->getOutputFormatterInput($f1, $input->reveal())->getOption('lalelu')); + self::assertEquals('jupp', $formatter->getOutputFormatterInput($f1, $input->reveal())->getOption('lalelu')); try { $formatter->getOutputFormatterInput($f2, $input->reveal())->getOption('lalelu'); diff --git a/tests/PathNameFilterIteratorTest.php b/tests/PathNameFilterIteratorTest.php index 52c0f0a6c..dc388d5f4 100644 --- a/tests/PathNameFilterIteratorTest.php +++ b/tests/PathNameFilterIteratorTest.php @@ -28,7 +28,7 @@ static function (\SplFileInfo $fileInfo) { sort($values); sort($resultArray); - static::assertEquals($resultArray, array_values($values)); + self::assertEquals($resultArray, array_values($values)); } public function getTestFilterData(): array diff --git a/tests/RulesetEngineTest.php b/tests/RulesetEngineTest.php index 847740021..a13032787 100644 --- a/tests/RulesetEngineTest.php +++ b/tests/RulesetEngineTest.php @@ -168,7 +168,7 @@ public function testProcess(array $dependenciesAsArray, array $classesInLayers, $configuration ); - static::assertCount($expectedCount, $context->violations()); + self::assertCount($expectedCount, $context->violations()); } public function provideTestGetSkippedViolations(): array @@ -236,7 +236,7 @@ public function testGetSkippedViolations(array $dependenciesAsArray, array $clas $configuration ); - static::assertCount($expectedSkippedViolationCount, $context->skippedViolations()); + self::assertCount($expectedSkippedViolationCount, $context->skippedViolations()); } public function provideTestIgnoreUncoveredInternalClasses(): iterable @@ -291,6 +291,6 @@ public function testIgnoreUncoveredInternalClasses(array $dependenciesAsArray, a $configuration ); - static::assertCount($expectedUncoveredCount, $context->uncovered()); + self::assertCount($expectedUncoveredCount, $context->uncovered()); } } diff --git a/tests/Subscriber/CacheableFileSubscriberTest.php b/tests/Subscriber/CacheableFileSubscriberTest.php index 9a2f03749..17ebd9a85 100644 --- a/tests/Subscriber/CacheableFileSubscriberTest.php +++ b/tests/Subscriber/CacheableFileSubscriberTest.php @@ -14,7 +14,7 @@ final class CacheableFileSubscriberTest extends TestCase { public function testSubscribedEvents(): void { - static::assertSame( + self::assertSame( [ PreCreateAstMapEvent::class => 'onPreCreateAstMapEvent', PostCreateAstMapEvent::class => 'onPostCreateAstMapEvent', @@ -26,7 +26,7 @@ public function testSubscribedEvents(): void public function testOnPreCreateAstMapEvent(): void { $cache = $this->createMock(AstFileReferenceFileCache::class); - $cache->expects(static::once())->method('load'); + $cache->expects(self::once())->method('load'); (new CacheableFileSubscriber($cache))->onPreCreateAstMapEvent(new PreCreateAstMapEvent(1)); } @@ -34,7 +34,7 @@ public function testOnPreCreateAstMapEvent(): void public function testOnPostCreateAstMapEvent(): void { $cache = $this->createMock(AstFileReferenceFileCache::class); - $cache->expects(static::once())->method('write'); + $cache->expects(self::once())->method('write'); (new CacheableFileSubscriber($cache))->onPostCreateAstMapEvent(new PostCreateAstMapEvent()); } diff --git a/tests/Subscriber/ConsoleSubscriberTest.php b/tests/Subscriber/ConsoleSubscriberTest.php index 03dabcbd8..4b72009f2 100644 --- a/tests/Subscriber/ConsoleSubscriberTest.php +++ b/tests/Subscriber/ConsoleSubscriberTest.php @@ -21,7 +21,7 @@ final class ConsoleSubscriberTest extends TestCase { public function testSubscribedEvents(): void { - static::assertSame( + self::assertSame( [ PreCreateAstMapEvent::class => 'onPreCreateAstMapEvent', PostCreateAstMapEvent::class => 'onPostCreateAstMapEvent', @@ -43,7 +43,7 @@ public function testOnPreCreateAstMapEventWithVerboseVerbosity(): void $subscriber = new ConsoleSubscriber($output); $subscriber->onPreCreateAstMapEvent(new PreCreateAstMapEvent(9999999)); - static::assertSame("Start to create an AstMap for 9999999 Files.\n", $output->fetch()); + self::assertSame("Start to create an AstMap for 9999999 Files.\n", $output->fetch()); } public function testOnPostCreateAstMapEventWithVerboseVerbosity(): void @@ -53,7 +53,7 @@ public function testOnPostCreateAstMapEventWithVerboseVerbosity(): void $subscriber = new ConsoleSubscriber($output); $subscriber->onPostCreateAstMapEvent(new PostCreateAstMapEvent()); - static::assertSame("AstMap created.\n", $output->fetch()); + self::assertSame("AstMap created.\n", $output->fetch()); } public function testOnAstFileAnalyzedEventWithVerboseVerbosity(): void @@ -63,7 +63,7 @@ public function testOnAstFileAnalyzedEventWithVerboseVerbosity(): void $subscriber = new ConsoleSubscriber($output); $subscriber->onAstFileAnalyzedEvent(new AstFileAnalyzedEvent(new \SplFileInfo('foo.php'))); - static::assertSame("Parsing File foo.php\n", $output->fetch()); + self::assertSame("Parsing File foo.php\n", $output->fetch()); } public function testOnAstFileSyntaxErrorEvent(): void @@ -75,7 +75,7 @@ public function testOnAstFileSyntaxErrorEvent(): void new AstFileSyntaxErrorEvent(new \SplFileInfo('foo.php'), 'Invalid') ); - static::assertSame("\nSyntax Error on File foo.php\nInvalid\n\n", $output->fetch()); + self::assertSame("\nSyntax Error on File foo.php\nInvalid\n\n", $output->fetch()); } public function testOnPreDependencyEmit(): void @@ -85,7 +85,7 @@ public function testOnPreDependencyEmit(): void $subscriber = new ConsoleSubscriber($output); $subscriber->onPreDependencyEmit(new PreEmitEvent('emitter-name')); - static::assertSame("start emitting dependencies \"emitter-name\"\n", $output->fetch()); + self::assertSame("start emitting dependencies \"emitter-name\"\n", $output->fetch()); } public function testOnPostDependencyEmit(): void @@ -95,7 +95,7 @@ public function testOnPostDependencyEmit(): void $subscriber = new ConsoleSubscriber($output); $subscriber->onPostDependencyEmit(new PostEmitEvent()); - static::assertSame("end emitting dependencies\n", $output->fetch()); + self::assertSame("end emitting dependencies\n", $output->fetch()); } public function testOnPreDependencyFlatten(): void @@ -105,7 +105,7 @@ public function testOnPreDependencyFlatten(): void $subscriber = new ConsoleSubscriber($output); $subscriber->onPreDependencyFlatten(new PreFlattenEvent()); - static::assertSame("start flatten dependencies\n", $output->fetch()); + self::assertSame("start flatten dependencies\n", $output->fetch()); } public function testOnPostDependencyFlatten(): void @@ -115,6 +115,6 @@ public function testOnPostDependencyFlatten(): void $subscriber = new ConsoleSubscriber($output); $subscriber->onPostDependencyFlatten(new PostFlattenEvent()); - static::assertSame("end flatten dependencies\n", $output->fetch()); + self::assertSame("end flatten dependencies\n", $output->fetch()); } } diff --git a/tests/Subscriber/ProgressSubscriberTest.php b/tests/Subscriber/ProgressSubscriberTest.php index 14590352c..efc4f1b34 100644 --- a/tests/Subscriber/ProgressSubscriberTest.php +++ b/tests/Subscriber/ProgressSubscriberTest.php @@ -19,7 +19,7 @@ final class ProgressSubscriberTest extends TestCase { public function testSubscribedEvents(): void { - static::assertSame( + self::assertSame( [ PreCreateAstMapEvent::class => 'onPreCreateAstMapEvent', PostCreateAstMapEvent::class => ['onPostCreateAstMapEvent', 1], @@ -45,7 +45,7 @@ public function testProgress(): void OUT; - static::assertSame($expectedOutput, $bufferedOutput->fetch()); + self::assertSame($expectedOutput, $bufferedOutput->fetch()); } public function testOnPostCreateAstMapEvent(): void @@ -63,7 +63,7 @@ public function testOnPostCreateAstMapEvent(): void OUT; - static::assertSame($expectedOutput, $formatter->fetch()); + self::assertSame($expectedOutput, $formatter->fetch()); } private function createSymfonyOutput(BufferedOutput $bufferedOutput): SymfonyOutput