protected function EntityStorageTest::setUp in Multiversion 8
Overrides MultiversionFunctionalTestBase::setUp
File
- tests/
src/ Functional/ EntityStorageTest.php, line 122
Class
- EntityStorageTest
- Test the content entity storage controller.
Namespace
Drupal\Tests\multiversion\FunctionalCode
protected function setUp() {
parent::setUp();
foreach ($this->entityTypes as $entity_type_id => $info) {
$this->entityTypes[$entity_type_id]['revision_id'] = $entity_type_id == 'node' ? 'vid' : 'revision_id';
if ($entity_type_id == 'node' || $entity_type_id == 'menu_link_content') {
$this->entityTypes[$entity_type_id]['name'] = 'title';
}
elseif ($entity_type_id == 'block_content') {
$this->entityTypes[$entity_type_id]['name'] = 'info';
}
else {
$this->entityTypes[$entity_type_id]['name'] = 'name';
}
if ($entity_type_id == 'file') {
file_put_contents($info['info']['uri'], 'Hello world!');
$this
->assertTrue($info['info']['uri'], t('The test file has been created.'));
}
}
}