You are here

public function StaticGeneratorTest::testExcludedEntityTypes in Tome 8

@covers \Drupal\tome_static\EventSubscriber\EntityPathSubscriber::collectPaths

File

modules/tome_static/tests/src/Kernel/StaticGeneratorTest.php, line 291

Class

StaticGeneratorTest
Tests that static site generation works.

Namespace

Drupal\Tests\tome_static\Kernel

Code

public function testExcludedEntityTypes() {
  $this
    ->enableModules([
    'link',
    'block_content',
  ]);
  $this
    ->installEntitySchema('block_content');

  /** @var \Drupal\tome_static\StaticGenerator $static */
  $static = \Drupal::service('tome_static.generator');
  BlockContentType::create([
    'id' => 'basic',
    'label' => 'basic',
  ])
    ->save();
  BlockContent::create([
    'info' => 'block',
    'type' => 'basic',
    'langcode' => 'en',
  ])
    ->save();
  $this
    ->assertNotContains('_entity:block_content:en:1', $static
    ->getPaths());
}