You are here

public function TwigColorTest::setUp in Twig Tools 8

Create a new TwigExtension object.

Overrides UnitTestCase::setUp

File

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

Class

TwigColorTest
Tests to ensure color convert 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 TwigColor();
  $this->twig
    ->addExtension($twigTools);
}