public function BambooTwigExtensionsI18nTest::testDateDiffTimeInAuto in Bamboo Twig 8.5
Same name and namespace in other branches
- 8.3 tests/src/Functional/BambooTwigExtensionsI18nTest.php \Drupal\Tests\bamboo_twig\Functional\BambooTwigExtensionsI18nTest::testDateDiffTimeInAuto()
- 8.4 tests/src/Functional/BambooTwigExtensionsI18nTest.php \Drupal\Tests\bamboo_twig\Functional\BambooTwigExtensionsI18nTest::testDateDiffTimeInAuto()
Cover the \Twig_Extensions_Extension_Date::diff.
File
- tests/
src/ Functional/ BambooTwigExtensionsI18nTest.php, line 322
Class
- BambooTwigExtensionsI18nTest
- Tests Extensions i18n of twig filters and functions.
Namespace
Drupal\Tests\bamboo_twig\FunctionalCode
public function testDateDiffTimeInAuto() {
$this
->drupalGet('/fr/bamboo-twig-extensions');
$this
->assertElementContains('.test-extensions div.date-diff-in-1', 'dans 1 second');
$this
->assertElementContains('.test-extensions div.date-diff-in-2', 'dans 5 secondes');
$this
->assertElementContains('.test-extensions div.date-diff-in-3', 'dans 1 minute');
$this
->assertElementContains('.test-extensions div.date-diff-in-4', 'dans 5 minutes');
$this
->assertElementContains('.test-extensions div.date-diff-in-5', 'dans 1 heure');
$this
->assertElementContains('.test-extensions div.date-diff-in-6', 'dans 9 heures');
$this
->assertElementContains('.test-extensions div.date-diff-in-7', 'dans 1 jour');
$this
->assertElementContains('.test-extensions div.date-diff-in-8', 'dans 5 jours');
$this
->assertElementContains('.test-extensions div.date-diff-in-9', 'dans 1 mois');
$this
->assertElementContains('.test-extensions div.date-diff-in-10', 'dans 6 mois');
$this
->assertElementContains('.test-extensions div.date-diff-in-11', 'dans 1 an');
$this
->assertElementContains('.test-extensions div.date-diff-in-12', 'dans 3 ans');
$this
->drupalGet('/de/bamboo-twig-extensions');
$this
->assertElementContains('.test-extensions div.date-diff-in-1', 'in 1 Sekunde');
$this
->assertElementContains('.test-extensions div.date-diff-in-2', 'in 5 Sekunden');
$this
->assertElementContains('.test-extensions div.date-diff-in-3', 'in 1 Minute');
$this
->assertElementContains('.test-extensions div.date-diff-in-4', 'in 5 Minuten');
$this
->assertElementContains('.test-extensions div.date-diff-in-5', 'in 1 Stunde');
$this
->assertElementContains('.test-extensions div.date-diff-in-6', 'in 9 Stunden');
$this
->assertElementContains('.test-extensions div.date-diff-in-7', 'in 1 Tag');
$this
->assertElementContains('.test-extensions div.date-diff-in-8', 'in 5 Tagen');
$this
->assertElementContains('.test-extensions div.date-diff-in-9', 'in 1 Monat');
$this
->assertElementContains('.test-extensions div.date-diff-in-10', 'in 6 Monaten');
$this
->assertElementContains('.test-extensions div.date-diff-in-11', 'in 1 Jahr');
$this
->assertElementContains('.test-extensions div.date-diff-in-12', 'in 3 Jahren');
}