diff --git a/core/modules/system/src/Tests/Plugin/Condition/RequestPathTest.php b/core/modules/system/src/Tests/Plugin/Condition/RequestPathTest.php index c1d4b2a..0312acc 100644 --- a/core/modules/system/src/Tests/Plugin/Condition/RequestPathTest.php +++ b/core/modules/system/src/Tests/Plugin/Condition/RequestPathTest.php @@ -54,8 +54,6 @@ class RequestPathTest extends KernelTestBase { protected function setUp() { parent::setUp(); - $this->installSchema('system', array('sequences', 'url_alias')); - $this->pluginManager = $this->container->get('plugin.manager.condition'); // Set a mock alias manager in the container. diff --git a/core/modules/system/src/Tests/System/TokenReplaceUnitTest.php b/core/modules/system/src/Tests/System/TokenReplaceUnitTest.php index 2152474..316b055 100644 --- a/core/modules/system/src/Tests/System/TokenReplaceUnitTest.php +++ b/core/modules/system/src/Tests/System/TokenReplaceUnitTest.php @@ -74,8 +74,6 @@ public function testClear() { * Tests the generation of all system site information tokens. */ public function testSystemSiteTokenReplacement() { - // The use of the url() function requires the url_alias table to exist. - $this->installSchema('system', 'url_alias'); $url_options = array( 'absolute' => TRUE, 'language' => $this->interfaceLanguage, diff --git a/core/modules/text/src/Tests/TextSummaryTest.php b/core/modules/text/src/Tests/TextSummaryTest.php index 27c660f..79a6646 100644 --- a/core/modules/text/src/Tests/TextSummaryTest.php +++ b/core/modules/text/src/Tests/TextSummaryTest.php @@ -21,7 +21,6 @@ class TextSummaryTest extends DrupalUnitTestBase { protected function setUp() { parent::setUp(); - $this->installSchema('system', 'url_alias'); $this->installConfig(array('text')); } diff --git a/core/modules/views/src/Tests/Handler/FieldUrlTest.php b/core/modules/views/src/Tests/Handler/FieldUrlTest.php index 04ed05c..3c23c7e 100644 --- a/core/modules/views/src/Tests/Handler/FieldUrlTest.php +++ b/core/modules/views/src/Tests/Handler/FieldUrlTest.php @@ -28,7 +28,6 @@ class FieldUrlTest extends ViewUnitTestBase { protected function setUp() { parent::setUp(); - $this->installSchema('system', 'url_alias'); } function viewsData() { diff --git a/core/modules/views/src/Tests/Plugin/DisplayPageTest.php b/core/modules/views/src/Tests/Plugin/DisplayPageTest.php index 22896ce..8c6b8d5 100644 --- a/core/modules/views/src/Tests/Plugin/DisplayPageTest.php +++ b/core/modules/views/src/Tests/Plugin/DisplayPageTest.php @@ -45,16 +45,6 @@ class DisplayPageTest extends ViewUnitTestBase { protected $routerDumper; /** - * {@inheritdoc} - */ - protected function setUp() { - parent::setUp(); - - // Setup the needed tables in order to make the drupal router working. - $this->installSchema('system', array('url_alias')); - } - - /** * Checks the behavior of the page for access denied/not found behaviors. */ public function testPageResponses() { diff --git a/core/modules/views/src/Tests/TokenReplaceTest.php b/core/modules/views/src/Tests/TokenReplaceTest.php index bb97765..b47841d 100644 --- a/core/modules/views/src/Tests/TokenReplaceTest.php +++ b/core/modules/views/src/Tests/TokenReplaceTest.php @@ -25,11 +25,6 @@ class TokenReplaceTest extends ViewUnitTestBase { */ public static $testViews = array('test_tokens'); - protected function setUp() { - parent::setUp(); - $this->installSchema('system', 'url_alias'); - } - /** * Tests core token replacements generated from a view. */ diff --git a/core/modules/views/src/Tests/ViewStorageTest.php b/core/modules/views/src/Tests/ViewStorageTest.php index fc78a9e..58d6983 100644 --- a/core/modules/views/src/Tests/ViewStorageTest.php +++ b/core/modules/views/src/Tests/ViewStorageTest.php @@ -185,9 +185,6 @@ protected function displayTests() { * Tests the display related functions like getDisplaysList(). */ protected function displayMethodTests() { - // Enable the system module so l() can work using url_alias table. - $this->installSchema('system', 'url_alias'); - $config['display'] = array( 'page_1' => array( 'display_options' => array('path' => 'test'), diff --git a/core/tests/Drupal/Tests/Core/Path/AliasManagerTest.php b/core/tests/Drupal/Tests/Core/Path/AliasManagerTest.php index 86108a5..c54b751 100644 --- a/core/tests/Drupal/Tests/Core/Path/AliasManagerTest.php +++ b/core/tests/Drupal/Tests/Core/Path/AliasManagerTest.php @@ -51,6 +51,13 @@ class AliasManagerTest extends UnitTestCase { protected $languageManager; /** + * Entity manager. + * + * @var \Drupal\Core\Entity\EntityManagerInterface|\PHPUnit_Framework_MockObject_MockObject + */ + protected $entityManager; + + /** * Cache backend. * * @var \Drupal\Core\Cache\CacheBackendInterface|\PHPUnit_Framework_MockObject_MockObject @@ -78,11 +85,17 @@ protected function setUp() { parent::setUp(); $this->aliasStorage = $this->getMock('Drupal\Core\Path\AliasStorageInterface'); + $this->entityManager = $this->getMock('Drupal\Core\Entity\EntityManagerInterface'); + $this->entityManager->expects($this->any()) + ->method('getStorage') + ->with('alias') + ->willReturn($this->aliasStorage); + $this->aliasWhitelist = $this->getMock('Drupal\Core\Path\AliasWhitelistInterface'); $this->languageManager = $this->getMock('Drupal\Core\Language\LanguageManagerInterface'); $this->cache = $this->getMock('Drupal\Core\Cache\CacheBackendInterface'); - $this->aliasManager = new AliasManager($this->aliasStorage, $this->aliasWhitelist, $this->languageManager, $this->cache); + $this->aliasManager = new AliasManager($this->entityManager, $this->aliasWhitelist, $this->languageManager, $this->cache); }