function DateTest::setUpDateFormatterStub
Initializes the $dateFormatterStub property.
2 calls to DateTest::setUpDateFormatterStub()
- DateTest::testFormatTimeDiffSince in core/
tests/ Drupal/ Tests/ Core/ Datetime/ DateTest.php - Tests the formatTimeDiffSince method.
- DateTest::testFormatTimeDiffUntil in core/
tests/ Drupal/ Tests/ Core/ Datetime/ DateTest.php - Tests the formatTimeDiffUntil method.
File
-
core/
tests/ Drupal/ Tests/ Core/ Datetime/ DateTest.php, line 105
Class
Namespace
Drupal\Tests\Core\DatetimeCode
protected function setUpDateFormatterStub() : void {
$this->dateFormatterStub = $this->getMockBuilder(DateFormatter::class)
->setConstructorArgs([
$this->entityTypeManager,
$this->languageManager,
$this->stringTranslation,
$this->getConfigFactoryStub(),
$this->requestStack,
])
->onlyMethods([
'formatDiff',
])
->getMock();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.