protected function BricksTest::setUp in Bricks 2.x
Same name in this branch
- 2.x tests/src/Functional/BricksTest.php \Drupal\Tests\bricks\Functional\BricksTest::setUp()
- 2.x tests/src/Kernel/BricksTest.php \Drupal\Tests\bricks\Kernel\BricksTest::setUp()
Same name and namespace in other branches
- 8 tests/src/Kernel/BricksTest.php \Drupal\Tests\bricks\Kernel\BricksTest::setUp()
Overrides KernelTestBase::setUp
File
- tests/
src/ Kernel/ BricksTest.php, line 32
Class
- BricksTest
- Class BricksTest
Namespace
Drupal\Tests\bricks\KernelCode
protected function setUp() {
parent::setUp();
$this
->installSchema('system', 'sequences');
$this
->installSchema('node', 'node_access');
array_map([
$this,
'installEntitySchema',
], [
'node',
'paragraph',
'user',
]);
array_map([
$this,
'installConfig',
], [
'bricks_test',
'system',
]);
// bricks_test sets the aunthenticated user to have access content
// permission.
$author = User::create([
'name' => 'author',
]);
$author
->save();
\Drupal::service('account_switcher')
->switchTo($author);
}