findUrlsByResourceLocator() public method

public findUrlsByResourceLocator ( $resourceLocator, $environment, $languageCode, $webspaceKey = null, $domain = null, $scheme = 'http' )
Ejemplo n.º 1
0
 public function testFindUrlsByResourceLocator()
 {
     $result = $this->webspaceManager->findUrlsByResourceLocator('/test', 'dev', 'en_us', 'massiveart');
     $this->assertEquals(['http://massiveart.lo/en-us/w/test', 'http://massiveart.lo/en-us/s/test'], $result);
     $result = $this->webspaceManager->findUrlsByResourceLocator('/test', 'dev', 'de_at', 'sulu_io');
     $this->assertEquals(['http://sulu.lo/test'], $result);
 }
Ejemplo n.º 2
0
 public function testFindUrlsByResourceLocatorWithScheme()
 {
     $result = $this->webspaceManager->findUrlsByResourceLocator('/test', 'dev', 'en_us', 'massiveart', null, 'https');
     $this->assertCount(2, $result);
     $this->assertContains('https://massiveart.lo/en-us/w/test', $result);
     $this->assertContains('https://massiveart.lo/en-us/s/test', $result);
     $result = $this->webspaceManager->findUrlsByResourceLocator('/test', 'dev', 'de_at', 'sulu_io', null, 'https');
     $this->assertEquals(['https://sulu.lo/test'], $result);
 }