You are here

public function SchemaFactoryTest::testCreateNodeArticleSchema in Schemata 8

@covers ::create

File

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

Class

SchemaFactoryTest
Tests the Schema Factory service.

Namespace

Drupal\Tests\schemata\Kernel

Code

public function testCreateNodeArticleSchema() {
  $schema = $this->factory
    ->create('node', 'article');
  $this
    ->assertInstanceOf(SchemaInterface::class, $schema);
  $this
    ->assertInstanceOf(NodeSchema::class, $schema);
  $this
    ->assertSchemaHasBundle($schema, 'article');
  $this
    ->assertSchemaHasTitle($schema);
  $this
    ->assertSchemaHasDescription($schema);
  $this
    ->assertSchemaHasProperties($schema);
}