You are here

public function StaticGeneratorTest::testRequestPath in Tome 8

@covers \Drupal\tome_static\StaticGenerator::requestPath

File

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

Class

StaticGeneratorTest
Tests that static site generation works.

Namespace

Drupal\Tests\tome_static\Kernel

Code

public function testRequestPath() {
  $this
    ->enableModules([
    'tome_test',
  ]);

  /** @var \Drupal\tome_static\StaticGenerator $static */
  $static = \Drupal::service('tome_static.generator');
  $static
    ->requestPath('/tome-test/page');
  $this
    ->assertStringContainsString('Hello, world', file_get_contents(Settings::get('tome_static_directory') . '/tome-test/page/index.html'));
}