Browse Source

chore: remove incorrect priority tests (#8231)

Kuba Werłos 5 months ago
parent
commit
c808dec276

+ 1 - 1
src/Fixer/Alias/BacktickToShellExecFixer.php

@@ -53,7 +53,7 @@ final class BacktickToShellExecFixer extends AbstractFixer
     /**
      * {@inheritdoc}
      *
-     * Must run before EscapeImplicitBackslashesFixer, ExplicitStringVariableFixer, NativeFunctionInvocationFixer, SingleQuoteFixer, StringImplicitBackslashesFixer.
+     * Must run before ExplicitStringVariableFixer, NativeFunctionInvocationFixer, SingleQuoteFixer.
      */
     public function getPriority(): int
     {

+ 1 - 1
src/Fixer/Import/NoUnusedImportsFixer.php

@@ -45,7 +45,7 @@ final class NoUnusedImportsFixer extends AbstractFixer
      * {@inheritdoc}
      *
      * Must run before BlankLineAfterNamespaceFixer, NoExtraBlankLinesFixer, NoLeadingImportSlashFixer, SingleLineAfterImportsFixer.
-     * Must run after ClassKeywordRemoveFixer, GlobalNamespaceImportFixer, PhpUnitDedicateAssertFixer, PhpUnitFqcnAnnotationFixer, SingleImportPerStatementFixer.
+     * Must run after ClassKeywordRemoveFixer, GlobalNamespaceImportFixer, PhpUnitDedicateAssertFixer, PhpUnitFqcnAnnotationFixer.
      */
     public function getPriority(): int
     {

+ 1 - 1
src/Fixer/Import/SingleImportPerStatementFixer.php

@@ -76,7 +76,7 @@ use Space\Models\ {
     /**
      * {@inheritdoc}
      *
-     * Must run before MultilineWhitespaceBeforeSemicolonsFixer, NoLeadingImportSlashFixer, NoSinglelineWhitespaceBeforeSemicolonsFixer, NoUnusedImportsFixer, SpaceAfterSemicolonFixer.
+     * Must run before MultilineWhitespaceBeforeSemicolonsFixer, NoLeadingImportSlashFixer, NoSinglelineWhitespaceBeforeSemicolonsFixer, SpaceAfterSemicolonFixer.
      */
     public function getPriority(): int
     {

+ 1 - 1
src/Fixer/StringNotation/EscapeImplicitBackslashesFixer.php

@@ -100,7 +100,7 @@ final class EscapeImplicitBackslashesFixer extends AbstractProxyFixer implements
      * {@inheritdoc}
      *
      * Must run before HeredocToNowdocFixer, SingleQuoteFixer.
-     * Must run after BacktickToShellExecFixer, MultilineStringToHeredocFixer.
+     * Must run after MultilineStringToHeredocFixer.
      */
     public function getPriority(): int
     {

+ 1 - 1
src/Fixer/StringNotation/StringImplicitBackslashesFixer.php

@@ -100,7 +100,7 @@ final class StringImplicitBackslashesFixer extends AbstractFixer implements Conf
      * {@inheritdoc}
      *
      * Must run before HeredocToNowdocFixer, SingleQuoteFixer.
-     * Must run after BacktickToShellExecFixer, MultilineStringToHeredocFixer.
+     * Must run after MultilineStringToHeredocFixer.
      */
     public function getPriority(): int
     {

+ 0 - 3
tests/AutoReview/FixerFactoryTest.php

@@ -353,11 +353,9 @@ final class FixerFactoryTest extends TestCase
                 'no_whitespace_in_blank_line',
             ],
             'backtick_to_shell_exec' => [
-                'escape_implicit_backslashes',
                 'explicit_string_variable',
                 'native_function_invocation',
                 'single_quote',
-                'string_implicit_backslashes',
             ],
             'blank_line_after_opening_tag' => [
                 'blank_lines_before_namespace',
@@ -902,7 +900,6 @@ final class FixerFactoryTest extends TestCase
                 'multiline_whitespace_before_semicolons',
                 'no_leading_import_slash',
                 'no_singleline_whitespace_before_semicolons',
-                'no_unused_imports',
                 'space_after_semicolon',
             ],
             'single_line_throw' => [

+ 5 - 0
tests/Fixer/StringNotation/EscapeImplicitBackslashesFixerTest.php

@@ -660,5 +660,10 @@ final class EscapeImplicitBackslashesFixerTest extends AbstractFixerTestCase
 
                 EOF,
         ];
+
+        yield 'execution operator' => [
+            '<?php $var = `ls a\\\b`;',
+            '<?php $var = `ls a\b`;',
+        ];
     }
 }

+ 5 - 0
tests/Fixer/StringNotation/StringImplicitBackslashesFixerTest.php

@@ -937,5 +937,10 @@ final class StringImplicitBackslashesFixerTest extends AbstractFixerTestCase
             null,
             ['heredoc' => 'ignore'],
         ];
+
+        yield 'execution operator' => [
+            '<?php $var = `ls a\\\b`;',
+            '<?php $var = `ls a\b`;',
+        ];
     }
 }

+ 0 - 11
tests/Fixtures/Integration/priority/backtick_to_shell_exec,escape_implicit_backslashes.test

@@ -1,11 +0,0 @@
---TEST--
-Integration of fixers: backtick_to_shell_exec,escape_implicit_backslashes.
---RULESET--
-{"backtick_to_shell_exec": true, "escape_implicit_backslashes": true}
---EXPECT--
-<?php
-$var = shell_exec("ls a\\b");
-
---INPUT--
-<?php
-$var = `ls a\b`;

+ 0 - 11
tests/Fixtures/Integration/priority/backtick_to_shell_exec,string_implicit_backslashes.test

@@ -1,11 +0,0 @@
---TEST--
-Integration of fixers: backtick_to_shell_exec,string_implicit_backslashes.
---RULESET--
-{"backtick_to_shell_exec": true, "string_implicit_backslashes": true}
---EXPECT--
-<?php
-$var = shell_exec("ls a\\b");
-
---INPUT--
-<?php
-$var = `ls a\b`;

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