diff --git a/core/tests/Drupal/Tests/Core/Theme/ThemeHandlerTest.php b/core/tests/Drupal/Tests/Core/Theme/ThemeHandlerTest.php index 8d4f53a..2c20eaf 100644 --- a/core/tests/Drupal/Tests/Core/Theme/ThemeHandlerTest.php +++ b/core/tests/Drupal/Tests/Core/Theme/ThemeHandlerTest.php @@ -135,8 +135,17 @@ public function testEnableSingleTheme() { ->expects($this->once()) ->method('save'); + $this->systemListingInfo->expects($this->any()) + ->method('scan') + ->will($this->returnValue(array())); + // Ensure that the themes_enabled hook is fired. - $this->moduleHandler->expects($this->once()) + $this->moduleHandler->expects($this->at(0)) + ->method('invokeAll') + ->with('system_theme_info') + ->will($this->returnValue(array())); + + $this->moduleHandler->expects($this->at(1)) ->method('invokeAll') ->with('themes_enabled', array($theme_list)); @@ -163,6 +172,10 @@ public function testEnableAndListInfo() { ->method('clear') ->will($this->returnSelf()); + $this->systemListingInfo->expects($this->any()) + ->method('scan') + ->will($this->returnValue(array())); + $this->themeHandler->enable(array('bartik')); $this->themeHandler->systemList['bartik'] = (object) array( 'name' => 'bartik',