You are here

public function TwigConvertTest::setUp in Twig Tools 8

Create a new TwigExtension object.

Overrides UnitTestCase::setUp

File

tests/src/Unit/TwigConvertTest.php, line 21

Class

TwigConvertTest
Tests to ensure conversions filters work correctly.

Namespace

Drupal\Tests\twig_tools\Unit

Code

public function setUp() {
  parent::setUp();
  $loader = new StringLoader();
  $this->twig = new \Twig_Environment($loader);
  $twigTools = new TwigConvert();
  $this->twig
    ->addExtension($twigTools);
}