public function BambooTwigI18nTest::testFormatDate in Bamboo Twig 8.2
Same name and namespace in other branches
- 8.5 tests/src/Functional/BambooTwigI18nTest.php \Drupal\Tests\bamboo_twig\Functional\BambooTwigI18nTest::testFormatDate()
- 8.3 tests/src/Functional/BambooTwigI18nTest.php \Drupal\Tests\bamboo_twig\Functional\BambooTwigI18nTest::testFormatDate()
- 8.4 tests/src/Functional/BambooTwigI18nTest.php \Drupal\Tests\bamboo_twig\Functional\BambooTwigI18nTest::testFormatDate()
@covers Drupal\bamboo_twig_i18n\TwigExtension\I18n::formatDate
File
- tests/
src/ Functional/ BambooTwigI18nTest.php, line 35
Class
- BambooTwigI18nTest
- Tests I18n twig filters and functions.
Namespace
Drupal\Tests\bamboo_twig\FunctionalCode
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');
}