public function BambooTwigFileTest::testExtensionGuesser in Bamboo Twig 8.5
Same name and namespace in other branches
- 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()
- 8.4 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 27
Class
- BambooTwigFileTest
- Tests File twig filters and functions.
Namespace
Drupal\Tests\bamboo_twig\FunctionalCode
public function testExtensionGuesser() {
$this
->drupalGet('/bamboo-twig-file');
$this
->assertSession()
->elementExists('css', '.test-files div.ext-guesser-pdf');
$this
->assertElementContains('.test-files div.ext-guesser-pdf', 'pdf');
$this
->assertSession()
->elementExists('css', '.test-files div.ext-guesser-word-legacy');
$this
->assertElementContains('.test-files div.ext-guesser-word-legacy', 'doc');
$this
->assertSession()
->elementExists('css', '.test-files div.ext-guesser-word');
$this
->assertElementContains('.test-files div.ext-guesser-word', 'docx');
$this
->assertSession()
->elementExists('css', '.test-files div.ext-guesser-png');
$this
->assertElementContains('.test-files div.ext-guesser-png', 'png');
}