Mercurial > hg > cmmr2012-drupal-site
diff vendor/consolidation/site-alias/tests/SiteAliasFileLoaderTest.php @ 5:12f9dff5fda9 tip
Update to Drupal core 8.7.1
author | Chris Cannam |
---|---|
date | Thu, 09 May 2019 15:34:47 +0100 |
parents | a9cd425dd02b |
children |
line wrap: on
line diff
--- a/vendor/consolidation/site-alias/tests/SiteAliasFileLoaderTest.php Thu Feb 28 13:11:55 2019 +0000 +++ b/vendor/consolidation/site-alias/tests/SiteAliasFileLoaderTest.php Thu May 09 15:34:47 2019 +0100 @@ -28,7 +28,7 @@ // Try to get the dev environment. $name = SiteAliasName::parse('@wild.dev'); $result = $this->callProtected('loadSingleAliasFile', [$name]); - $this->assertTrue($result instanceof AliasRecord); + $this->assertTrue($result instanceof SiteAlias); $this->assertEquals('/path/to/wild', $result->get('root')); $this->assertEquals('bar', $result->get('foo')); @@ -36,7 +36,7 @@ // a wildcard alias, there should $name = SiteAliasName::parse('@wild.other'); $result = $this->callProtected('loadSingleAliasFile', [$name]); - $this->assertTrue($result instanceof AliasRecord); + $this->assertTrue($result instanceof SiteAlias); $this->assertEquals('/wild/path/to/wild', $result->get('root')); $this->assertEquals('bar', $result->get('foo')); @@ -60,28 +60,28 @@ $name = new SiteAliasName('simple'); $this->assertEquals('simple', $name->sitename()); $result = $this->callProtected('loadSingleAliasFile', [$name]); - $this->assertTrue($result instanceof AliasRecord); + $this->assertTrue($result instanceof SiteAlias); $this->assertEquals('/path/to/simple', $result->get('root')); // Look for a single alias without an environment specified. $name = new SiteAliasName('single'); $this->assertEquals('single', $name->sitename()); $result = $this->callProtected('loadSingleAliasFile', [$name]); - $this->assertTrue($result instanceof AliasRecord); + $this->assertTrue($result instanceof SiteAlias); $this->assertEquals('/path/to/single', $result->get('root')); $this->assertEquals('bar', $result->get('foo')); // Same test, but with environment explicitly requested. $name = SiteAliasName::parse('@single.alternate'); $result = $this->callProtected('loadSingleAliasFile', [$name]); - $this->assertTrue($result instanceof AliasRecord); + $this->assertTrue($result instanceof SiteAlias); $this->assertEquals('/alternate/path/to/single', $result->get('root')); $this->assertEquals('bar', $result->get('foo')); // Same test, but with location explicitly filtered. $name = SiteAliasName::parse('@other.single.dev'); $result = $this->callProtected('loadSingleAliasFile', [$name]); - $this->assertTrue($result instanceof AliasRecord); + $this->assertTrue($result instanceof SiteAlias); $this->assertEquals('/other/path/to/single', $result->get('root')); $this->assertEquals('baz', $result->get('foo')); @@ -96,11 +96,6 @@ $this->assertFalse($result); } - public function testLoadLegacy() - { - $this->sut->addSearchLocation($this->fixturesDir() . '/sitealiases/legacy'); - } - public function testLoad() { $this->sut->addSearchLocation($this->fixturesDir() . '/sitealiases/sites'); @@ -108,20 +103,20 @@ // Look for a simple alias with no environments defined $name = new SiteAliasName('simple'); $result = $this->sut->load($name); - $this->assertTrue($result instanceof AliasRecord); + $this->assertTrue($result instanceof SiteAlias); $this->assertEquals('/path/to/simple', $result->get('root')); // Look for a single alias without an environment specified. $name = new SiteAliasName('single'); $result = $this->sut->load($name); - $this->assertTrue($result instanceof AliasRecord); + $this->assertTrue($result instanceof SiteAlias); $this->assertEquals('/path/to/single', $result->get('root')); $this->assertEquals('bar', $result->get('foo')); // Same test, but with environment explicitly requested. $name = new SiteAliasName('single', 'alternate'); $result = $this->sut->load($name); - $this->assertTrue($result instanceof AliasRecord); + $this->assertTrue($result instanceof SiteAlias); $this->assertEquals('/alternate/path/to/single', $result->get('root')); $this->assertEquals('bar', $result->get('foo'));