/** * @test * it should set index with uri to index map when setting index for uri */ public function it_should_set_index_with_uri_to_index_map_when_setting_index_for_uri() { $uri = '/foo'; $this->uriToIndexMapper->setRoot($this->root->url())->shouldBeCalled(); $this->uriToIndexMapper->getIndexForUri($uri)->willReturn('/some-index.php'); $sut = $this->make_instance(); $sut->setRootFolder($this->root->url()); $sut->setIndexFor($uri); $this->assertEquals($this->root->url() . '/some-index.php', $sut->getIndex()); }
public function setIndexFor($uri) { $this->index = $this->rootFolder . $this->uriToIndexMapper->getIndexForUri($uri); }