You are here

public function BambooTwigRenderTest::testImageStyle in Bamboo Twig 8.5

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

@covers Drupal\bamboo_twig_loader\TwigExtension\Render::renderImageStyle

File

tests/src/Functional/BambooTwigRenderTest.php, line 211

Class

BambooTwigRenderTest
Tests Renders twig filters and functions.

Namespace

Drupal\Tests\bamboo_twig\Functional

Code

public function testImageStyle() {
  $this
    ->drupalGet('/bamboo-twig-render');
  $this
    ->assertSession()
    ->elementExists('css', '.test-render div.render-image-style-uri');
  $this
    ->assertElementContains('.test-render div.render-image-style-uri', 'files/styles/thumbnail/public/antistatique.jpg');
  $this
    ->assertSession()
    ->elementExists('css', '.test-render div.render-image-style-uri-preprocess');
  $this
    ->assertElementContains('.test-render div.render-image-style-uri-preprocess', 'files/styles/thumbnail/public/antistatique.jpg');
}