getIndexForUri() 공개 메소드

public getIndexForUri ( $uri )
예제 #1
0
 /**
  * @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());
 }
예제 #2
0
 public function setIndexFor($uri)
 {
     $this->index = $this->rootFolder . $this->uriToIndexMapper->getIndexForUri($uri);
 }