You are here

public function BambooTwigExtensionsTest::testDateDiffTimeInNotHumanized in Bamboo Twig 8.2

Same name and namespace in other branches
  1. 8.5 tests/src/Functional/BambooTwigExtensionsTest.php \Drupal\Tests\bamboo_twig\Functional\BambooTwigExtensionsTest::testDateDiffTimeInNotHumanized()
  2. 8.3 tests/src/Functional/BambooTwigExtensionsTest.php \Drupal\Tests\bamboo_twig\Functional\BambooTwigExtensionsTest::testDateDiffTimeInNotHumanized()
  3. 8.4 tests/src/Functional/BambooTwigExtensionsTest.php \Drupal\Tests\bamboo_twig\Functional\BambooTwigExtensionsTest::testDateDiffTimeInNotHumanized()

Cover the \Twig_Extensions_Extension_Date::diff.

File

tests/src/Functional/BambooTwigExtensionsTest.php, line 220

Class

BambooTwigExtensionsTest
Tests Configs twig filters and functions.

Namespace

Drupal\Tests\bamboo_twig\Functional

Code

public function testDateDiffTimeInNotHumanized() {
  $this
    ->drupalGet('/bamboo-twig-extensions');
  $this
    ->assertElementContains('.test-extensions div.date-diff-robot-in-1', '1');
  $this
    ->assertElementContains('.test-extensions div.date-diff-robot-in-2', '5');
  $this
    ->assertElementContains('.test-extensions div.date-diff-robot-in-3', '1');
  $this
    ->assertElementContains('.test-extensions div.date-diff-robot-in-4', '5');
  $this
    ->assertElementContains('.test-extensions div.date-diff-robot-in-5', '1');
  $this
    ->assertElementContains('.test-extensions div.date-diff-robot-in-6', '9');
  $this
    ->assertElementContains('.test-extensions div.date-diff-robot-in-7', '1');
  $this
    ->assertElementContains('.test-extensions div.date-diff-robot-in-8', '5');
  $this
    ->assertElementContains('.test-extensions div.date-diff-robot-in-9', '1');
  $this
    ->assertElementContains('.test-extensions div.date-diff-robot-in-10', '6');
  $this
    ->assertElementContains('.test-extensions div.date-diff-robot-in-11', '1');
  $this
    ->assertElementContains('.test-extensions div.date-diff-robot-in-12', '3');
}