public function ModuleHandlerTest::testWriteCache in Drupal 8
Test that write cache calls through to cache library correctly.
@covers ::writeCache
File
- core/
tests/ Drupal/ Tests/ Core/ Extension/ ModuleHandlerTest.php, line 423
Class
- ModuleHandlerTest
- @coversDefaultClass \Drupal\Core\Extension\ModuleHandler @runTestsInSeparateProcesses
Namespace
Drupal\Tests\Core\ExtensionCode
public function testWriteCache() {
$module_handler = $this
->getModuleHandler();
$this->cacheBackend
->expects($this
->exactly(2))
->method('get')
->will($this
->returnValue(NULL));
$this->cacheBackend
->expects($this
->exactly(2))
->method('set')
->with($this
->logicalOr('module_implements', 'hook_info'));
$module_handler
->getImplementations('hook');
$module_handler
->writeCache();
}