protected function BaseFieldTest::setUp in Field Encryption 3.0.x
@TODO: Simplify setUp() by extending EncryptTestBase when https://www.drupal.org/node/2692387 lands.
File
- tests/
src/ Functional/ BaseFieldTest.php, line 45
Class
- BaseFieldTest
- Tests base field encryption.
Namespace
Drupal\Tests\field_encrypt\FunctionalCode
protected function setUp() {
parent::setUp();
// Create an admin user.
$this->adminUser = $this
->drupalCreateUser([
'access administration pages',
'administer encrypt',
'administer keys',
'administer field encryption',
], NULL, TRUE);
$this
->drupalLogin($this->adminUser);
// Create content type to test.
$this
->drupalCreateContentType([
'type' => 'page',
'name' => 'Basic page',
]);
$this
->config('field_encrypt.settings')
->set('encryption_profile', 'encryption_profile_1')
->save();
}