class ComponentTestDoesNotExtendCoreTestTest

Tests ComponentTestDoesNotExtendCoreTest rule.

Hierarchy

Expanded class hierarchy of ComponentTestDoesNotExtendCoreTestTest

File

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

Namespace

Drupal\PHPStan\Tests
View 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


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