protected function FieldUnitTestBase::setUp in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/field/src/Tests/FieldUnitTestBase.php \Drupal\field\Tests\FieldUnitTestBase::setUp()
Set the default field storage backend for fields created during tests.
Overrides KernelTestBase::setUp
25 calls to FieldUnitTestBase::setUp()
- BooleanItemTest::setUp in core/
modules/ field/ src/ Tests/ Boolean/ BooleanItemTest.php - Set the default field storage backend for fields created during tests.
- BulkDeleteTest::setUp in core/
modules/ field/ src/ Tests/ BulkDeleteTest.php - Set the default field storage backend for fields created during tests.
- CommentItemTest::setUp in core/
modules/ comment/ src/ Tests/ CommentItemTest.php - Set the default field storage backend for fields created during tests.
- ConfigFieldDefinitionTest::setUp in core/
modules/ field/ src/ Tests/ ConfigFieldDefinitionTest.php - Set the default field storage backend for fields created during tests.
- DateTimeItemTest::setUp in core/
modules/ datetime/ src/ Tests/ DateTimeItemTest.php - Set the default field storage backend for fields created during tests.
25 methods override FieldUnitTestBase::setUp()
- BooleanItemTest::setUp in core/
modules/ field/ src/ Tests/ Boolean/ BooleanItemTest.php - Set the default field storage backend for fields created during tests.
- BulkDeleteTest::setUp in core/
modules/ field/ src/ Tests/ BulkDeleteTest.php - Set the default field storage backend for fields created during tests.
- CommentItemTest::setUp in core/
modules/ comment/ src/ Tests/ CommentItemTest.php - Set the default field storage backend for fields created during tests.
- ConfigFieldDefinitionTest::setUp in core/
modules/ field/ src/ Tests/ ConfigFieldDefinitionTest.php - Set the default field storage backend for fields created during tests.
- DateTimeItemTest::setUp in core/
modules/ datetime/ src/ Tests/ DateTimeItemTest.php - Set the default field storage backend for fields created during tests.
File
- core/
modules/ field/ src/ Tests/ FieldUnitTestBase.php, line 46 - Contains \Drupal\field\Tests\FieldUnitTestBase.
Class
- FieldUnitTestBase
- Parent class for Field API unit tests.
Namespace
Drupal\field\TestsCode
protected function setUp() {
parent::setUp();
$this->fieldTestData = new \ArrayObject(array(), \ArrayObject::ARRAY_AS_PROPS);
$this
->installEntitySchema('entity_test');
$this
->installEntitySchema('user');
$this
->installSchema('system', [
'router',
'sequences',
'key_value',
]);
// Set default storage backend and configure the theme system.
$this
->installConfig(array(
'field',
'system',
));
// Create user 1.
$storage = \Drupal::entityManager()
->getStorage('user');
$storage
->create(array(
'uid' => 1,
'name' => 'entity-test',
'mail' => 'entity@localhost',
'status' => TRUE,
))
->save();
}