function ComponentTestDoesNotExtendCoreTestTest::testRule

File

core/tests/PHPStan/tests/ComponentTestDoesNotExtendCoreTestTest.php, line 30

Class

ComponentTestDoesNotExtendCoreTestTest
Tests ComponentTestDoesNotExtendCoreTest rule.

Namespace

Drupal\PHPStan\Tests

Code

public function testRule() : void {
  $this->analyse([
    __DIR__ . '/../fixtures/component-tests.php',
  ], [
    [
      'Component tests should not extend Drupal\\Tests\\UnitTestCase.',
      19,
    ],
    [
      'Component tests should not extend Drupal\\BuildTests\\Framework\\BuildTestBase.',
      22,
    ],
    [
      'Component tests should not extend Drupal\\KernelTests\\KernelTestBase.',
      25,
    ],
    [
      'Component tests should not extend Drupal\\Tests\\BrowserTestBase.',
      28,
    ],
    [
      'Component tests should not extend Drupal\\Tests\\BrowserTestBase.',
      31,
    ],
  ]);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.