protected function PBTKernelTestBase::setUp in Permissions by Term 8.2
Same name and namespace in other branches
- 8 tests/src/Kernel/PBTKernelTestBase.php \Drupal\Tests\permissions_by_term\Kernel\PBTKernelTestBase::setUp()
Overrides KernelTestBase::setUp
7 calls to PBTKernelTestBase::setUp()
- AccessCheckTest::setUp in tests/
src/ Kernel/ AccessCheckTest.php - AccessStorageTest::setUp in tests/
src/ Kernel/ AccessStorageTest.php - MultilingualTest::setUp in tests/
src/ Kernel/ MultilingualTest.php - NodeAccessRecordsTest::setUp in tests/
src/ Kernel/ NodeAccessRecordsTest.php - NodeEntityBundleInfoTest::setUp in tests/
src/ Kernel/ NodeEntityBundleInfoTest.php
7 methods override PBTKernelTestBase::setUp()
- AccessCheckTest::setUp in tests/
src/ Kernel/ AccessCheckTest.php - AccessStorageTest::setUp in tests/
src/ Kernel/ AccessStorageTest.php - MultilingualTest::setUp in tests/
src/ Kernel/ MultilingualTest.php - NodeAccessRecordsTest::setUp in tests/
src/ Kernel/ NodeAccessRecordsTest.php - NodeEntityBundleInfoTest::setUp in tests/
src/ Kernel/ NodeEntityBundleInfoTest.php
File
- tests/
src/ Kernel/ PBTKernelTestBase.php, line 64
Class
- PBTKernelTestBase
- Class PBTKernelTestBase
Namespace
Drupal\Tests\permissions_by_term\KernelCode
protected function setUp() {
parent::setUp();
$this
->installEntitySchema('user');
$this
->installSchema('system', [
'key_value_expire',
'sequences',
]);
$this
->installEntitySchema('node');
$this
->installEntitySchema('taxonomy_term');
$this
->installConfig([
'permissions_by_term',
'language',
]);
$this
->installSchema('node', 'node_access');
$this
->installSchema('permissions_by_term', 'permissions_by_term_user');
$this
->installSchema('permissions_by_term', 'permissions_by_term_role');
$this->accessStorage = $this->container
->get('permissions_by_term.access_storage');
$this->accessCheck = $this->container
->get('permissions_by_term.access_check');
\Drupal::configFactory()
->getEditable('taxonomy.settings')
->set('maintain_index_table', TRUE)
->save();
$this
->createTestVocabularies();
$this
->createPageNodeType();
$this
->createCurrentUser();
$this
->createAdminUser();
}