Browse Source

Merge branch 'master' into 3.0

# Conflicts:
#	tests/AutoReview/FixerTest.php
#	tests/Console/ConfigurationResolverTest.php
#	tests/Console/Output/ProcessOutputTest.php
#	tests/Differ/SebastianBergmannDifferTest.php
#	tests/Differ/SebastianBergmannShortDifferTest.php
#	tests/Fixer/Alias/NoMixedEchoPrintFixerTest.php
#	tests/Fixer/Alias/RandomApiMigrationFixerTest.php
#	tests/Fixer/ClassNotation/ClassDefinitionFixerTest.php
#	tests/Fixer/LanguageConstruct/IsNullFixerTest.php
#	tests/FixerDefinition/FixerDefinitionTest.php
#	tests/Tokenizer/TokenTest.php
Dariusz Ruminski 5 years ago
parent
commit
d422f19d45

+ 1 - 1
src/RuleSet.php

@@ -260,7 +260,7 @@ final class RuleSet implements RuleSetInterface
             'php_unit_set_up_tear_down_visibility' => true,
             'php_unit_strict' => true,
             'php_unit_test_annotation' => true,
-            'php_unit_test_case_static_method_calls' => ['call_type' => 'this'],
+            'php_unit_test_case_static_method_calls' => true,
             'strict_comparison' => true,
             'strict_param' => true,
             'string_line_ending' => true,

+ 2 - 2
tests/AbstractFunctionReferenceFixerTest.php

@@ -56,7 +56,7 @@ final class AbstractFunctionReferenceFixerTest extends TestCase
     ) {
         $tokens = Tokens::fromCode($source);
 
-        $this->assertSame(
+        static::assertSame(
             $expected,
             $this->fixer->findTest(
                 $functionNameToSearch,
@@ -66,7 +66,7 @@ final class AbstractFunctionReferenceFixerTest extends TestCase
             )
         );
 
-        $this->assertFalse($tokens->isChanged());
+        static::assertFalse($tokens->isChanged());
     }
 
     public function provideAbstractFunctionReferenceFixerCases()

+ 1 - 1
tests/AutoReview/CommandTest.php

@@ -34,7 +34,7 @@ final class CommandTest extends TestCase
      */
     public function testCommandHasNameConst(Command $command)
     {
-        $this->assertSame($command->getName(), \constant(\get_class($command).'::COMMAND_NAME'));
+        static::assertSame($command->getName(), \constant(\get_class($command).'::COMMAND_NAME'));
     }
 
     public function provideCommandHasNameConstCases()

+ 1 - 1
tests/AutoReview/ComposerTest.php

@@ -35,7 +35,7 @@ final class ComposerTest extends TestCase
             return;
         }
 
-        $this->assertSame(
+        static::assertSame(
             ['dev-master' => $this->convertAppVersionToAliasedVersion(Application::VERSION)],
             $composerJson['extra']['branch-alias']
         );

+ 1 - 1
tests/AutoReview/DescribeCommandTest.php

@@ -46,7 +46,7 @@ final class DescribeCommandTest extends TestCase
             'name' => $fixerName,
         ]);
 
-        $this->assertSame(0, $commandTester->getStatusCode());
+        static::assertSame(0, $commandTester->getStatusCode());
     }
 
     public function provideDescribeCommandCases()

+ 13 - 13
tests/AutoReview/FixerFactoryTest.php

@@ -33,9 +33,9 @@ final class FixerFactoryTest extends TestCase
         $factory->registerBuiltInFixers();
         $fixers = $factory->getFixers();
 
-        $this->assertSame('encoding', $fixers[0]->getName(), 'Expected "encoding" fixer to have the highest priority.');
-        $this->assertSame('full_opening_tag', $fixers[1]->getName(), 'Expected "full_opening_tag" fixer has second highest priority.');
-        $this->assertSame('single_blank_line_at_eof', $fixers[\count($fixers) - 1]->getName(), 'Expected "single_blank_line_at_eof" to have the lowest priority.');
+        static::assertSame('encoding', $fixers[0]->getName(), 'Expected "encoding" fixer to have the highest priority.');
+        static::assertSame('full_opening_tag', $fixers[1]->getName(), 'Expected "full_opening_tag" fixer has second highest priority.');
+        static::assertSame('single_blank_line_at_eof', $fixers[\count($fixers) - 1]->getName(), 'Expected "single_blank_line_at_eof" to have the lowest priority.');
     }
 
     /**
@@ -44,7 +44,7 @@ final class FixerFactoryTest extends TestCase
      */
     public function testFixersPriority(FixerInterface $first, FixerInterface $second)
     {
-        $this->assertLessThan($first->getPriority(), $second->getPriority(), sprintf('"%s" should have less priority than "%s"', \get_class($second), \get_class($first)));
+        static::assertLessThan($first->getPriority(), $second->getPriority(), sprintf('"%s" should have less priority than "%s"', \get_class($second), \get_class($first)));
     }
 
     public function provideFixersPriorityCases()
@@ -291,11 +291,11 @@ final class FixerFactoryTest extends TestCase
         $integrationTestName = $this->generateIntegrationTestName($first, $second);
 
         if (\in_array($integrationTestName, $casesWithoutTests, true)) {
-            $this->assertFalse($integrationTestExists, sprintf('Case "%s" already has an integration test, so it should be removed from "$casesWithoutTests".', $integrationTestName));
-            $this->markTestIncomplete(sprintf('Case "%s" has no integration test yet, please help and add it.', $integrationTestName));
+            static::assertFalse($integrationTestExists, sprintf('Case "%s" already has an integration test, so it should be removed from "$casesWithoutTests".', $integrationTestName));
+            static::markTestIncomplete(sprintf('Case "%s" has no integration test yet, please help and add it.', $integrationTestName));
         }
 
-        $this->assertTrue($integrationTestExists, sprintf('There shall be an integration test "%s". How do you know that priority set up is good, if there is no integration test to check it?', $integrationTestName));
+        static::assertTrue($integrationTestExists, sprintf('There shall be an integration test "%s". How do you know that priority set up is good, if there is no integration test to check it?', $integrationTestName));
     }
 
     public function provideFixersPriorityPairsHaveIntegrationTestCases()
@@ -328,8 +328,8 @@ final class FixerFactoryTest extends TestCase
             }
 
             $fileName = $candidate->getFilename();
-            $this->assertTrue($candidate->isFile(), sprintf('Expected only files in the priority integration test directory, got "%s".', $fileName));
-            $this->assertFalse($candidate->isLink(), sprintf('No (sym)links expected the priority integration test directory, got "%s".', $fileName));
+            static::assertTrue($candidate->isFile(), sprintf('Expected only files in the priority integration test directory, got "%s".', $fileName));
+            static::assertFalse($candidate->isLink(), sprintf('No (sym)links expected the priority integration test directory, got "%s".', $fileName));
         }
     }
 
@@ -360,16 +360,16 @@ final class FixerFactoryTest extends TestCase
         if (\in_array($fileName, [
             'braces,indentation_type,no_break_comment.test',
         ], true)) {
-            $this->markTestIncomplete(sprintf('Case "%s" has unexpected name, please help fixing it.', $fileName));
+            static::markTestIncomplete(sprintf('Case "%s" has unexpected name, please help fixing it.', $fileName));
         }
 
         if (\in_array($fileName, [
             'combine_consecutive_issets,no_singleline_whitespace_before_semicolons.test',
         ], true)) {
-            $this->markTestIncomplete(sprintf('Case "%s" is not fully handled, please help fixing it.', $fileName));
+            static::markTestIncomplete(sprintf('Case "%s" is not fully handled, please help fixing it.', $fileName));
         }
 
-        $this->assertSame(
+        static::assertSame(
             1,
             preg_match('#^([a-z][a-z0-9_]*),([a-z][a-z_]*)(?:_\d{1,3})?\.test(-(in|out)\.php)?$#', $fileName, $matches),
             sprintf('File with unexpected name "%s" in the priority integration test directory.', $fileName)
@@ -378,7 +378,7 @@ final class FixerFactoryTest extends TestCase
         $fixerName1 = $matches[1];
         $fixerName2 = $matches[2];
 
-        $this->assertTrue(
+        static::assertTrue(
             isset($priorityCases[$fixerName1][$fixerName2]) || isset($priorityCases[$fixerName2][$fixerName1]),
             sprintf('Missing priority test entry for file "%s".', $fileName)
         );

+ 29 - 29
tests/AutoReview/FixerTest.php

@@ -57,35 +57,35 @@ final class FixerTest extends TestCase
         $definition = $fixer->getDefinition();
         $fixerIsConfigurable = $fixer instanceof ConfigurableFixerInterface;
 
-        $this->assertRegExp('/^[A-Z`].*\.$/', $definition->getSummary(), sprintf('[%s] Description must start with capital letter or a ` and end with dot.', $fixerName));
-        $this->assertNotContains('phpdocs', $definition->getSummary(), sprintf('[%s] `PHPDoc` must not be in the plural in description.', $fixerName), true);
+        static::assertRegExp('/^[A-Z`].*\.$/', $definition->getSummary(), sprintf('[%s] Description must start with capital letter or a ` and end with dot.', $fixerName));
+        static::assertNotContains('phpdocs', $definition->getSummary(), sprintf('[%s] `PHPDoc` must not be in the plural in description.', $fixerName), true);
         $this->assertCorrectCasing($definition->getSummary(), 'PHPDoc', sprintf('[%s] `PHPDoc` must be in correct casing in description.', $fixerName));
         $this->assertCorrectCasing($definition->getSummary(), 'PHPUnit', sprintf('[%s] `PHPUnit` must be in correct casing in description.', $fixerName));
 
         $samples = $definition->getCodeSamples();
-        $this->assertNotEmpty($samples, sprintf('[%s] Code samples are required.', $fixerName));
+        static::assertNotEmpty($samples, sprintf('[%s] Code samples are required.', $fixerName));
 
         $configSamplesProvided = [];
         $dummyFileInfo = new StdinFileInfo();
         foreach ($samples as $sampleCounter => $sample) {
-            $this->assertInstanceOf(CodeSampleInterface::class, $sample, sprintf('[%s] Sample #%d', $fixerName, $sampleCounter));
-            $this->assertInternalType('int', $sampleCounter);
+            static::assertInstanceOf(CodeSampleInterface::class, $sample, sprintf('[%s] Sample #%d', $fixerName, $sampleCounter));
+            static::assertInternalType('int', $sampleCounter);
 
             $code = $sample->getCode();
             $this->assertStringIsNotEmpty($code, sprintf('[%s] Sample #%d', $fixerName, $sampleCounter));
             if (!($fixer instanceof SingleBlankLineAtEofFixer)) {
-                $this->assertSame("\n", substr($code, -1), sprintf('[%s] Sample #%d must end with linebreak', $fixerName, $sampleCounter));
+                static::assertSame("\n", substr($code, -1), sprintf('[%s] Sample #%d must end with linebreak', $fixerName, $sampleCounter));
             }
 
             $config = $sample->getConfiguration();
             if (null !== $config) {
-                $this->assertTrue($fixerIsConfigurable, sprintf('[%s] Sample #%d has configuration, but the fixer is not configurable.', $fixerName, $sampleCounter));
-                $this->assertInternalType('array', $config, sprintf('[%s] Sample #%d configuration must be an array or null.', $fixerName, $sampleCounter));
+                static::assertTrue($fixerIsConfigurable, sprintf('[%s] Sample #%d has configuration, but the fixer is not configurable.', $fixerName, $sampleCounter));
+                static::assertInternalType('array', $config, sprintf('[%s] Sample #%d configuration must be an array or null.', $fixerName, $sampleCounter));
 
                 $configSamplesProvided[$sampleCounter] = $config;
             } elseif ($fixerIsConfigurable) {
                 if (!$sample instanceof VersionSpecificCodeSampleInterface) {
-                    $this->assertArrayNotHasKey('default', $configSamplesProvided, sprintf('[%s] Multiple non-versioned samples with default configuration.', $fixerName));
+                    static::assertArrayNotHasKey('default', $configSamplesProvided, sprintf('[%s] Multiple non-versioned samples with default configuration.', $fixerName));
                 }
 
                 $configSamplesProvided['default'] = true;
@@ -107,7 +107,7 @@ final class FixerTest extends TestCase
                 $tokens
             );
 
-            $this->assertTrue($tokens->isChanged(), sprintf('[%s] Sample #%d is not changed during fixing.', $fixerName, $sampleCounter));
+            static::assertTrue($tokens->isChanged(), sprintf('[%s] Sample #%d is not changed during fixing.', $fixerName, $sampleCounter));
 
             $duplicatedCodeSample = array_search(
                 $sample,
@@ -115,7 +115,7 @@ final class FixerTest extends TestCase
                 false
             );
 
-            $this->assertFalse(
+            static::assertFalse(
                 $duplicatedCodeSample,
                 sprintf('[%s] Sample #%d duplicates #%d.', $fixerName, $sampleCounter, $duplicatedCodeSample)
             );
@@ -124,9 +124,9 @@ final class FixerTest extends TestCase
         if ($fixerIsConfigurable) {
             if (isset($configSamplesProvided['default'])) {
                 reset($configSamplesProvided);
-                $this->assertSame('default', key($configSamplesProvided), sprintf('[%s] First sample must be for the default configuration.', $fixerName));
+                static::assertSame('default', key($configSamplesProvided), sprintf('[%s] First sample must be for the default configuration.', $fixerName));
             } elseif (!isset($this->allowedFixersWithoutDefaultCodeSample[$fixerName])) {
-                $this->assertArrayHasKey($fixerName, $this->allowedRequiredOptions, sprintf('[%s] Has no sample for default configuration.', $fixerName));
+                static::assertArrayHasKey($fixerName, $this->allowedRequiredOptions, sprintf('[%s] Has no sample for default configuration.', $fixerName));
             }
 
             $options = $fixer->getConfigurationDefinition()->getOptions();
@@ -137,20 +137,20 @@ final class FixerTest extends TestCase
                     'final_internal_class',
                     'ordered_class_elements',
                 ], true)) {
-                    $this->markTestIncomplete(sprintf('Rule "%s" is not following new option casing yet, please help.', $fixerName));
+                    static::markTestIncomplete(sprintf('Rule "%s" is not following new option casing yet, please help.', $fixerName));
                 }
 
-                $this->assertRegExp('/^[a-z_]*$/', $option->getName(), sprintf('[%s] Option %s is not snake_case.', $fixerName, $option->getName()));
+                static::assertRegExp('/^[a-z_]*$/', $option->getName(), sprintf('[%s] Option %s is not snake_case.', $fixerName, $option->getName()));
             }
         }
 
         if ($fixer->isRisky()) {
             $this->assertStringIsNotEmpty($definition->getRiskyDescription(), sprintf('[%s] Risky reasoning is required.', $fixerName));
-            $this->assertNotContains('phpdocs', $definition->getRiskyDescription(), sprintf('[%s] `PHPDoc` must not be in the plural in risky reasoning.', $fixerName), true);
+            static::assertNotContains('phpdocs', $definition->getRiskyDescription(), sprintf('[%s] `PHPDoc` must not be in the plural in risky reasoning.', $fixerName), true);
             $this->assertCorrectCasing($definition->getRiskyDescription(), 'PHPDoc', sprintf('[%s] `PHPDoc` must be in correct casing in risky reasoning.', $fixerName));
             $this->assertCorrectCasing($definition->getRiskyDescription(), 'PHPUnit', sprintf('[%s] `PHPUnit` must be in correct casing in risky reasoning.', $fixerName));
         } else {
-            $this->assertNull($definition->getRiskyDescription(), sprintf('[%s] Fixer is not risky so no description of it expected.', $fixerName));
+            static::assertNull($definition->getRiskyDescription(), sprintf('[%s] Fixer is not risky so no description of it expected.', $fixerName));
         }
     }
 
@@ -161,7 +161,7 @@ final class FixerTest extends TestCase
     {
         $reflection = new \ReflectionClass($fixer);
 
-        $this->assertTrue(
+        static::assertTrue(
             $reflection->isFinal(),
             sprintf('Fixer "%s" must be declared "final".', $fixer->getName())
         );
@@ -175,16 +175,16 @@ final class FixerTest extends TestCase
         $reflection = new \ReflectionClass($fixer);
         $comment = $reflection->getDocComment();
 
-        $this->assertNotContains(
+        static::assertNotContains(
             'DEPRECATED',
             $fixer->getDefinition()->getSummary(),
             'Fixer cannot contain word "DEPRECATED" in summary'
         );
 
         if ($fixer instanceof DeprecatedFixerInterface) {
-            $this->assertContains('@deprecated', $comment);
+            static::assertContains('@deprecated', $comment);
         } elseif (\is_string($comment)) {
-            $this->assertNotContains('@deprecated', $comment);
+            static::assertNotContains('@deprecated', $comment);
         }
     }
 
@@ -204,13 +204,13 @@ final class FixerTest extends TestCase
     {
         $configurationDefinition = $fixer->getConfigurationDefinition();
 
-        $this->assertInstanceOf(\PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface::class, $configurationDefinition);
+        static::assertInstanceOf(\PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface::class, $configurationDefinition);
 
         foreach ($configurationDefinition->getOptions() as $option) {
-            $this->assertInstanceOf(\PhpCsFixer\FixerConfiguration\FixerOptionInterface::class, $option);
-            $this->assertNotEmpty($option->getDescription());
+            static::assertInstanceOf(\PhpCsFixer\FixerConfiguration\FixerOptionInterface::class, $option);
+            static::assertNotEmpty($option->getDescription());
 
-            $this->assertSame(
+            static::assertSame(
                 !isset($this->allowedRequiredOptions[$fixer->getName()][$option->getName()]),
                 $option->hasDefault(),
                 sprintf(
@@ -222,7 +222,7 @@ final class FixerTest extends TestCase
                 )
             );
 
-            $this->assertNotContains(
+            static::assertNotContains(
                 'DEPRECATED',
                 $option->getDescription(),
                 'Option description cannot contain word "DEPRECATED"'
@@ -254,8 +254,8 @@ final class FixerTest extends TestCase
      */
     private static function assertStringIsNotEmpty($actual, $message = '')
     {
-        self::assertInternalType('string', $actual, $message);
-        self::assertNotEmpty($actual, $message);
+        static::assertInternalType('string', $actual, $message);
+        static::assertNotEmpty($actual, $message);
     }
 
     /**
@@ -265,6 +265,6 @@ final class FixerTest extends TestCase
      */
     private static function assertCorrectCasing($needle, $haystack, $message)
     {
-        self::assertSame(substr_count(strtolower($haystack), strtolower($needle)), substr_count($haystack, $needle), $message);
+        static::assertSame(substr_count(strtolower($haystack), strtolower($needle)), substr_count($haystack, $needle), $message);
     }
 }

+ 19 - 19
tests/AutoReview/ProjectCodeTest.php

@@ -55,7 +55,7 @@ final class ProjectCodeTest extends TestCase
             static function ($class) { return !class_exists($class) && !trait_exists($class); }
         );
 
-        $this->assertSame([], $unknownClasses);
+        static::assertSame([], $unknownClasses);
     }
 
     /**
@@ -68,12 +68,12 @@ final class ProjectCodeTest extends TestCase
         $testClassName = str_replace('PhpCsFixer', 'PhpCsFixer\\Tests', $className).'Test';
 
         if (\in_array($className, self::$classesWithoutTests, true)) {
-            $this->assertFalse(class_exists($testClassName), sprintf('Class "%s" already has tests, so it should be removed from "%s::$classesWithoutTests".', $className, __CLASS__));
-            $this->markTestIncomplete(sprintf('Class "%s" has no tests yet, please help and add it.', $className));
+            static::assertFalse(class_exists($testClassName), sprintf('Class "%s" already has tests, so it should be removed from "%s::$classesWithoutTests".', $className, __CLASS__));
+            static::markTestIncomplete(sprintf('Class "%s" has no tests yet, please help and add it.', $className));
         }
 
-        $this->assertTrue(class_exists($testClassName), sprintf('Expected test class "%s" for "%s" not found.', $testClassName, $className));
-        $this->assertTrue(is_subclass_of($testClassName, TestCase::class), sprintf('Expected test class "%s" to be a subclass of "\PhpCsFixer\Tests\TestCase".', $testClassName));
+        static::assertTrue(class_exists($testClassName), sprintf('Expected test class "%s" for "%s" not found.', $testClassName, $className));
+        static::assertTrue(is_subclass_of($testClassName, TestCase::class), sprintf('Expected test class "%s" to be a subclass of "\PhpCsFixer\Tests\TestCase".', $testClassName));
     }
 
     /**
@@ -123,7 +123,7 @@ final class ProjectCodeTest extends TestCase
 
         sort($extraMethods);
 
-        $this->assertEmpty(
+        static::assertEmpty(
             $extraMethods,
             sprintf(
                 "Class '%s' should not have public methods that are not part of implemented interfaces.\nViolations:\n%s",
@@ -145,13 +145,13 @@ final class ProjectCodeTest extends TestCase
         $rc = new \ReflectionClass($className);
 
         if (\PhpCsFixer\Fixer\Alias\NoMixedEchoPrintFixer::class === $className) {
-            $this->markTestIncomplete(sprintf(
+            static::markTestIncomplete(sprintf(
                 'Public properties of fixer `%s` will be removed on 3.0.',
                 \PhpCsFixer\Fixer\Alias\NoMixedEchoPrintFixer::class
             ));
         }
 
-        $this->assertEmpty(
+        static::assertEmpty(
             $rc->getProperties(\ReflectionProperty::IS_PUBLIC),
             sprintf('Class \'%s\' should not have public properties.', $className)
         );
@@ -190,7 +190,7 @@ final class ProjectCodeTest extends TestCase
 
         sort($extraProps);
 
-        $this->assertEmpty(
+        static::assertEmpty(
             $extraProps,
             sprintf(
                 "Class '%s' should not have protected properties.\nViolations:\n%s",
@@ -211,7 +211,7 @@ final class ProjectCodeTest extends TestCase
     {
         $rc = new \ReflectionClass($className);
 
-        $this->assertTrue(
+        static::assertTrue(
             $rc->isTrait() || $rc->isAbstract() || $rc->isFinal(),
             sprintf('Test class %s should be trait, abstract or final.', $className)
         );
@@ -227,7 +227,7 @@ final class ProjectCodeTest extends TestCase
         $rc = new \ReflectionClass($className);
         $doc = new DocBlock($rc->getDocComment());
 
-        $this->assertNotEmpty(
+        static::assertNotEmpty(
             $doc->getAnnotationsOfType('internal'),
             sprintf('Test class %s should have internal annotation.', $className)
         );
@@ -247,7 +247,7 @@ final class ProjectCodeTest extends TestCase
         }
 
         foreach ($dataProviderMethodNames as $dataProviderMethodName) {
-            $this->assertRegExp('/^provide[A-Z]\S+Cases$/', $dataProviderMethodName, sprintf(
+            static::assertRegExp('/^provide[A-Z]\S+Cases$/', $dataProviderMethodName, sprintf(
                 'Data provider in "%s" with name "%s" is not correctly named.',
                 $testClassName,
                 $dataProviderMethodName
@@ -278,13 +278,13 @@ final class ProjectCodeTest extends TestCase
         );
         $strings = array_unique($strings);
         $message = sprintf('Class %s must not use preg_*, it shall use Preg::* instead.', $className);
-        $this->assertNotContains('preg_filter', $strings, $message);
-        $this->assertNotContains('preg_grep', $strings, $message);
-        $this->assertNotContains('preg_match', $strings, $message);
-        $this->assertNotContains('preg_match_all', $strings, $message);
-        $this->assertNotContains('preg_replace', $strings, $message);
-        $this->assertNotContains('preg_replace_callback', $strings, $message);
-        $this->assertNotContains('preg_split', $strings, $message);
+        static::assertNotContains('preg_filter', $strings, $message);
+        static::assertNotContains('preg_grep', $strings, $message);
+        static::assertNotContains('preg_match', $strings, $message);
+        static::assertNotContains('preg_match_all', $strings, $message);
+        static::assertNotContains('preg_replace', $strings, $message);
+        static::assertNotContains('preg_replace_callback', $strings, $message);
+        static::assertNotContains('preg_split', $strings, $message);
     }
 
     public function provideSrcClassCases()

+ 4 - 4
tests/AutoReview/ProjectFixerConfigurationTest.php

@@ -32,9 +32,9 @@ final class ProjectFixerConfigurationTest extends TestCase
     {
         $config = $this->loadConfig();
 
-        $this->assertInstanceOf(\PhpCsFixer\Config::class, $config);
-        $this->assertEmpty($config->getCustomFixers());
-        $this->assertNotEmpty($config->getRules());
+        static::assertInstanceOf(\PhpCsFixer\Config::class, $config);
+        static::assertEmpty($config->getCustomFixers());
+        static::assertNotEmpty($config->getRules());
 
         // call so the fixers get configured to reveal issue (like deprecated configuration used etc.)
         $resolver = new ConfigurationResolver(
@@ -51,7 +51,7 @@ final class ProjectFixerConfigurationTest extends TestCase
     {
         $rules = $rulesSorted = array_keys($this->loadConfig()->getRules());
         sort($rulesSorted);
-        $this->assertSame($rulesSorted, $rules, 'Please sort the "rules" in `.php_cs.dist` of this project.');
+        static::assertSame($rulesSorted, $rules, 'Please sort the "rules" in `.php_cs.dist` of this project.');
     }
 
     /**

+ 2 - 2
tests/AutoReview/TransformerTest.php

@@ -37,7 +37,7 @@ final class TransformerTest extends TestCase
     {
         $transformerRef = new \ReflectionClass($transformer);
 
-        $this->assertTrue(
+        static::assertTrue(
             $transformerRef->isFinal(),
             sprintf('Transformer "%s" must be declared "final."', $transformer->getName())
         );
@@ -69,7 +69,7 @@ final class TransformerTest extends TestCase
      */
     public function testTransformerPriority(TransformerInterface $first, TransformerInterface $second)
     {
-        $this->assertLessThan(
+        static::assertLessThan(
             $first->getPriority(),
             $second->getPriority(),
             sprintf('"%s" should have less priority than "%s"', \get_class($second), \get_class($first))

Some files were not shown because too many files changed in this diff