class ComponentTestDoesNotExtendCoreTestTest
Tests ComponentTestDoesNotExtendCoreTest rule.
Hierarchy
- class \Drupal\PHPStan\Tests\ComponentTestDoesNotExtendCoreTestTest extends \PHPStan\Testing\RuleTestCase
Expanded class hierarchy of ComponentTestDoesNotExtendCoreTestTest
File
-
core/
tests/ PHPStan/ tests/ ComponentTestDoesNotExtendCoreTestTest.php, line 15
Namespace
Drupal\PHPStan\TestsView source
class ComponentTestDoesNotExtendCoreTestTest extends RuleTestCase {
/**
* {@inheritdoc}
*/
protected function getRule() : Rule {
return new ComponentTestDoesNotExtendCoreTest();
}
/**
* {@inheritdoc}
*/
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,
],
]);
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
ComponentTestDoesNotExtendCoreTestTest::getRule | protected | function | |
ComponentTestDoesNotExtendCoreTestTest::testRule | public | function |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.