You are here

protected function SchemaFactoryTest::setUp in Schemata 8

Overrides KernelTestBase::setUp

File

tests/src/Kernel/SchemaFactoryTest.php, line 41

Class

SchemaFactoryTest
Tests the Schema Factory service.

Namespace

Drupal\Tests\schemata\Kernel

Code

protected function setUp() {
  parent::setUp();

  // Add the entity schemas.
  $this
    ->installEntitySchema('node');
  $this
    ->installEntitySchema('user');

  // Add the additional table schemas.
  $this
    ->installSchema('system', [
    'sequences',
  ]);
  $this
    ->installSchema('node', [
    'node_access',
  ]);
  $this
    ->installSchema('user', [
    'users_data',
  ]);
  $this->nodeType = NodeType::create([
    'type' => 'article',
  ]);
  $this->nodeType
    ->save();
  $this->factory = \Drupal::service('schemata.schema_factory');
}