public function DateTest::testFormatIntervalZeroSecond in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Datetime/DateTest.php \Drupal\Tests\Core\Datetime\DateTest::testFormatIntervalZeroSecond()
- 9 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 151
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);
}