public function BambooTwigFileTest::testExtensionGuesser in Bamboo Twig 8.4
Same name and namespace in other branches
- 8.5 tests/src/Functional/BambooTwigFileTest.php \Drupal\Tests\bamboo_twig\Functional\BambooTwigFileTest::testExtensionGuesser()
- 8.2 tests/src/Functional/BambooTwigFileTest.php \Drupal\Tests\bamboo_twig\Functional\BambooTwigFileTest::testExtensionGuesser()
- 8.3 tests/src/Functional/BambooTwigFileTest.php \Drupal\Tests\bamboo_twig\Functional\BambooTwigFileTest::testExtensionGuesser()
@covers Drupal\bamboo_twig_file\TwigExtension\File::extensionGuesser
File
- tests/
src/ Functional/ BambooTwigFileTest.php, line 26
Class
- BambooTwigFileTest
- Tests File twig filters and functions.
Namespace
Drupal\Tests\bamboo_twig\FunctionalCode
public function testExtensionGuesser() {
$this
->drupalGet('/bamboo-twig-file');
$this
->assertElementPresent('.test-files div.ext-guesser-pdf');
$this
->assertElementContains('.test-files div.ext-guesser-pdf', 'pdf');
$this
->assertElementPresent('.test-files div.ext-guesser-word-legacy');
$this
->assertElementContains('.test-files div.ext-guesser-word-legacy', 'doc');
$this
->assertElementPresent('.test-files div.ext-guesser-word');
$this
->assertElementContains('.test-files div.ext-guesser-word', 'docx');
$this
->assertElementPresent('.test-files div.ext-guesser-jpg');
$this
->assertElementContains('.test-files div.ext-guesser-jpg', 'jpeg');
}