function FormCacheTest::setUpMockLogger
Reinitializes the logger as a mock object.
1 call to FormCacheTest::setUpMockLogger()
- FormCacheTest::testSetCacheBuildIdMismatch in core/
tests/ Drupal/ Tests/ Core/ Form/ FormCacheTest.php - Tests set cache build id mismatch.
File
-
core/
tests/ Drupal/ Tests/ Core/ Form/ FormCacheTest.php, line 170
Class
Namespace
Drupal\Tests\Core\FormCode
protected function setUpMockLogger() : void {
$this->logger = $this->createMock(LoggerInterface::class);
$reflection = new \ReflectionProperty($this->formCache, 'logger');
$reflection->setValue($this->formCache, $this->logger);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.