BambooTwigI18nTest.php in Bamboo Twig 8.2
File
tests/src/Functional/BambooTwigI18nTest.php
View source
<?php
namespace Drupal\Tests\bamboo_twig\Functional;
class BambooTwigI18nTest extends BambooTwigTestBase {
public static $modules = [
'bamboo_twig',
'bamboo_twig_i18n',
'bamboo_twig_test',
];
public function testCurrentLang() {
$this
->drupalGet('/bamboo-twig-i18n');
$this
->assertElementPresent('.test-i18n div.i18n-current-lang');
$this
->assertElementContains('.test-i18n div.i18n-current-lang', 'en');
}
public function testFormatDate() {
$this
->drupalGet('/bamboo-twig-i18n');
$this
->assertElementPresent('.test-i18n div.i18n-format-date-string');
$this
->assertElementContains('.test-i18n div.i18n-format-date-string', 'Thursday 24th July 2014');
$this
->assertElementPresent('.test-i18n div.i18n-format-date-timestamp');
$this
->assertElementContains('.test-i18n div.i18n-format-date-timestamp', 'Thursday 24th July 2014');
$this
->assertElementPresent('.test-i18n div.i18n-format-date-datetime');
$this
->assertElementContains('.test-i18n div.i18n-format-date-datetime', 'Thursday 24th July 2014');
$this
->assertElementPresent('.test-i18n div.i18n-format-date-datetimeplus');
$this
->assertElementContains('.test-i18n div.i18n-format-date-datetimeplus', 'Thursday 24th July 2014');
$this
->assertElementPresent('.test-i18n div.i18n-format-date-drupaldatetime');
$this
->assertElementContains('.test-i18n div.i18n-format-date-drupaldatetime', 'Thursday 24th July 2014');
$this
->assertElementPresent('.test-i18n div.i18n-format-date-datetime-medium');
$this
->assertElementContains('.test-i18n div.i18n-format-date-datetime-medium', 'Thu, 07/24/2014');
}
}