Verified Commit f67a2f21 authored by Michael Strelan's avatar Michael Strelan
Browse files

fix: #3626548 Fix RunInSeparateProcesses typos

By: mcdruid
By: bt dev2
By: dcam
By: catch
(cherry picked from commit 4a3b0586)
parent 38d5ef21
Loading
Loading
Loading
Loading
Loading
+1 −1
Changes for core/tests/Drupal/Tests/Core/Test/BrowserTestBaseTest.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -97,7 +97,7 @@ public function testTearDownWithoutSetUp(): void {
/**
 * A class extending BrowserTestBase for testing purposes.
 *
 * @phpstan-ignore testClass.missingAttribute.Group, testClass.missingAttribute.RunInSeparateProcesses
 * @phpstan-ignore testClass.missingAttribute.Group, testClass.missingAttribute.RunTestsInSeparateProcesses
 */
class BrowserTestBaseMockableClassTest extends BrowserTestBase {

+1 −1
Changes for core/tests/Drupal/Tests/Core/Test/WebDriverTestBaseTest.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -52,7 +52,7 @@ public function testCapabilities($expected, ?string $mink_driver_args_webdriver,
    $this->putEnv("MINK_DRIVER_ARGS_WEBDRIVER", $mink_driver_args_webdriver);
    $this->putEnv("MINK_DRIVER_ARGS", $mink_driver_args);

    // @phpstan-ignore testClass.missingAttribute.Group, testClass.missingAttribute.RunInSeparateProcesses
    // @phpstan-ignore testClass.missingAttribute.Group, testClass.missingAttribute.RunTestsInSeparateProcesses
    $object = new #[IgnoreDeprecations] class('test') extends WebDriverTestBase {

      public function test(): void {
+2 −2
Changes for core/tests/PHPStan/Rules/TestClassClassMetadata.php: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -152,8 +152,8 @@ public function processNode(Node $node, Scope $scope): array {
        $class->isSubclassOfClass($this->reflectionProvider->getClass(BrowserTestBase::class)) ||
        $class->isSubclassOfClass($this->reflectionProvider->getClass(KernelTestBase::class));
      if ($should_run_in_separate_process && !$has_run_in_separate_process_attribute) {
        $fails[] = RuleErrorBuilder::message("Test class {$class->getName()} must have attribute \PHPUnit\Framework\Attributes\RunInSeparateProcesses.")
          ->identifier('testClass.missingAttribute.RunInSeparateProcesses')
        $fails[] = RuleErrorBuilder::message("Test class {$class->getName()} must have attribute \PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses.")
          ->identifier('testClass.missingAttribute.RunTestsInSeparateProcesses')
          ->line($node->getStartLine())
          ->build();
      }
+2 −2
Changes for core/tests/PHPStan/tests/TestClassClassMetadataTest.php: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -65,7 +65,7 @@ public function testRule(): void {
      [__DIR__ . '/../fixtures/test-classes-missing-attributes.php'],
      [
        [
          'Test class Drupal\Tests\Core\Foo\MissingAttributes must have attribute \PHPUnit\Framework\Attributes\RunInSeparateProcesses.',
          'Test class Drupal\Tests\Core\Foo\MissingAttributes must have attribute \PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses.',
          18,
        ],
        [
@@ -77,7 +77,7 @@ public function testRule(): void {
          21,
        ],
        [
          'Test class Drupal\Tests\Core\Foo\MissingRunTestsInSeparateProcesses must have attribute \PHPUnit\Framework\Attributes\RunInSeparateProcesses.',
          'Test class Drupal\Tests\Core\Foo\MissingRunTestsInSeparateProcesses must have attribute \PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses.',
          25,
        ],
      ]