You are here

protected function AmpFormatterTest::setUp in Accelerated Mobile Pages (AMP) 8

Overrides BrowserTestBase::setUp

File

tests/src/Functional/AmpFormatterTest.php, line 56

Class

AmpFormatterTest
Tests AMP view mode.

Namespace

Drupal\Tests\amp\Functional

Code

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

  // Install the theme. It is not possible to test a contrib theme
  // so tests are limited to things that work in the core themes.
  // @see https://www.drupal.org/node/2232651
  $this->container
    ->get('theme_installer')
    ->install([
    'bartik',
    'seven',
  ]);
  $this->container
    ->get('config.factory')
    ->getEditable('system.theme')
    ->set('default', 'bartik')
    ->set('admin', 'seven')
    ->save();

  // Create Article node type.
  $this
    ->createContentType([
    'type' => 'article',
    'name' => 'Article',
  ]);
}