public function BambooTwigExtensionsTest::testDateDiffTimeInForcedUnitNotHumanized in Bamboo Twig 8.5
Same name and namespace in other branches
- 8.2 tests/src/Functional/BambooTwigExtensionsTest.php \Drupal\Tests\bamboo_twig\Functional\BambooTwigExtensionsTest::testDateDiffTimeInForcedUnitNotHumanized()
- 8.3 tests/src/Functional/BambooTwigExtensionsTest.php \Drupal\Tests\bamboo_twig\Functional\BambooTwigExtensionsTest::testDateDiffTimeInForcedUnitNotHumanized()
- 8.4 tests/src/Functional/BambooTwigExtensionsTest.php \Drupal\Tests\bamboo_twig\Functional\BambooTwigExtensionsTest::testDateDiffTimeInForcedUnitNotHumanized()
Cover the \Twig_Extensions_Extension_Date::diff.
File
- tests/
src/ Functional/ BambooTwigExtensionsTest.php, line 177
Class
- BambooTwigExtensionsTest
- Tests Extensions twig filters and functions.
Namespace
Drupal\Tests\bamboo_twig\FunctionalCode
public function testDateDiffTimeInForcedUnitNotHumanized() {
$this
->drupalGet('/bamboo-twig-extensions');
$this
->assertElementContains('.test-extensions div.date-diff-unit-robot-in-1', '1');
$this
->assertElementContains('.test-extensions div.date-diff-unit-robot-in-2', '5');
$this
->assertElementContains('.test-extensions div.date-diff-unit-robot-in-3', '1');
$this
->assertElementContains('.test-extensions div.date-diff-unit-robot-in-4', '302');
$this
->assertElementContains('.test-extensions div.date-diff-unit-robot-in-5', '61');
$this
->assertElementContains('.test-extensions div.date-diff-unit-robot-in-6', '32702');
$this
->assertElementContains('.test-extensions div.date-diff-unit-robot-in-7', '1');
$this
->assertElementContains('.test-extensions div.date-diff-unit-robot-in-8', '0.16666666666667');
$this
->assertElementContains('.test-extensions div.date-diff-unit-robot-in-9', '1.0666666666667');
$this
->assertElementContains('.test-extensions div.date-diff-unit-robot-in-10', '189');
$this
->assertElementContains('.test-extensions div.date-diff-unit-robot-in-11', '13.233333333333');
$this
->assertElementContains('.test-extensions div.date-diff-unit-robot-in-12', '3.088295687885');
}