function DateTest::testFormatIntervalZeroSecond
Same name in other branches
- 8.9.x core/tests/Drupal/Tests/Core/Datetime/DateTest.php \Drupal\Tests\Core\Datetime\DateTest::testFormatIntervalZeroSecond()
- 10 core/tests/Drupal/Tests/Core/Datetime/DateTest.php \Drupal\Tests\Core\Datetime\DateTest::testFormatIntervalZeroSecond()
- 11.x core/tests/Drupal/Tests/Core/Datetime/DateTest.php \Drupal\Tests\Core\Datetime\DateTest::testFormatIntervalZeroSecond()
Tests the formatInterval method for 0 second.
File
-
core/
tests/ Drupal/ Tests/ Core/ Datetime/ DateTest.php, line 154
Class
- DateTest
- @coversDefaultClass \Drupal\Core\Datetime\DateFormatter @group Datetime
Namespace
Drupal\Tests\Core\DatetimeCode
public function testFormatIntervalZeroSecond() {
$result = $this->dateFormatter
->formatInterval(0, 1, 'xxx-lolspeak');
$this->assertEquals(new TranslatableMarkup('0 sec', [], [
'langcode' => 'xxx-lolspeak',
], $this->stringTranslation), $result);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.