public function BambooTwigLoaderTest::testImage in Bamboo Twig 8.3
Same name and namespace in other branches
- 8.5 tests/src/Functional/BambooTwigLoaderTest.php \Drupal\Tests\bamboo_twig\Functional\BambooTwigLoaderTest::testImage()
- 8.2 tests/src/Functional/BambooTwigLoaderTest.php \Drupal\Tests\bamboo_twig\Functional\BambooTwigLoaderTest::testImage()
- 8.4 tests/src/Functional/BambooTwigLoaderTest.php \Drupal\Tests\bamboo_twig\Functional\BambooTwigLoaderTest::testImage()
@covers Drupal\bamboo_twig_loader\TwigExtension\Loader::loadImage
File
- tests/
src/ Functional/ BambooTwigLoaderTest.php, line 124
Class
- BambooTwigLoaderTest
- Tests Loaders twig filters and functions.
Namespace
Drupal\Tests\bamboo_twig\FunctionalCode
public function testImage() {
$this
->drupalGet('/bamboo-twig-loader');
// Load an image using uri public://antistatique.jpg.
$this
->assertElementPresent('.test-loaders div.loader-image-uri');
$this
->assertElementContains('.test-loaders div.loader-image-uri', $this->file
->getFileUri());
// Load an image using uri public://antistatique.jpg.
$this
->assertElementPresent('.test-loaders div.loader-image-path');
$this
->assertElementContains('.test-loaders div.loader-image-path', 'bamboo_twig_test/files/antistatique.jpg');
}