You are here

public function BambooTwigTokenTest::setUp in Bamboo Twig 8.3

Same name and namespace in other branches
  1. 8.5 tests/src/Functional/BambooTwigTokenTest.php \Drupal\Tests\bamboo_twig\Functional\BambooTwigTokenTest::setUp()
  2. 8.2 tests/src/Functional/BambooTwigTokenTest.php \Drupal\Tests\bamboo_twig\Functional\BambooTwigTokenTest::setUp()
  3. 8.4 tests/src/Functional/BambooTwigTokenTest.php \Drupal\Tests\bamboo_twig\Functional\BambooTwigTokenTest::setUp()

Overrides BrowserTestBase::setUp

File

tests/src/Functional/BambooTwigTokenTest.php, line 26

Class

BambooTwigTokenTest
Tests Token twig filters and functions.

Namespace

Drupal\Tests\bamboo_twig\Functional

Code

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

  // Create an article content type that we will use for testing.
  $this
    ->drupalCreateContentType([
    'type' => 'article',
    'name' => 'Article',
  ]);

  // Create an article node that we will use for testing.
  $this->article = $this
    ->drupalCreateNode([
    'title' => 'Hello, world!',
    'type' => 'article',
  ]);
  $this->article
    ->save();
  $this->container
    ->get('router.builder')
    ->rebuild();
}