protected function FieldCreateTest::setUp in Organic groups 8
Overrides KernelTestBase::setUp
File
- tests/
src/ Kernel/ Entity/ FieldCreateTest.php, line 45
Class
- FieldCreateTest
- Testing field definition overrides.
Namespace
Drupal\Tests\og\Kernel\EntityCode
protected function setUp() : void {
parent::setUp();
// Add membership and config schema.
$this
->installConfig([
'og',
]);
$this
->installEntitySchema('og_membership');
$this
->installEntitySchema('user');
$this
->installEntitySchema('node');
// Create several bundles.
for ($i = 0; $i <= 4; $i++) {
$bundle = NodeType::create([
'type' => mb_strtolower($this
->randomMachineName()),
'name' => $this
->randomString(),
]);
$bundle
->save();
$this->bundles[] = $bundle
->id();
}
}