예제 #1
0
 /**
  * @test
  */
 public function resetSetsAllOptionsToTheirDefaultValue()
 {
     $this->uriBuilder->setArguments(array('test' => 'arguments'))->setSection('testSection')->setFormat('someFormat')->setCreateAbsoluteUri(true)->setAddQueryString(true)->setArgumentsToBeExcludedFromQueryString(array('test' => 'addQueryStringExcludeArguments'))->setAddQueryStringMethod(null)->setArgumentPrefix('testArgumentPrefix')->setLinkAccessRestrictedPages(true)->setTargetPageUid(123)->setTargetPageType(321)->setNoCache(true)->setUseCacheHash(false);
     $this->uriBuilder->reset();
     $this->assertEquals(array(), $this->uriBuilder->getArguments());
     $this->assertEquals('', $this->uriBuilder->getSection());
     $this->assertEquals('', $this->uriBuilder->getFormat());
     $this->assertEquals(false, $this->uriBuilder->getCreateAbsoluteUri());
     $this->assertEquals(false, $this->uriBuilder->getAddQueryString());
     $this->assertEquals(array(), $this->uriBuilder->getArgumentsToBeExcludedFromQueryString());
     $this->assertEquals(null, $this->uriBuilder->getAddQueryStringMethod());
     $this->assertEquals(null, $this->uriBuilder->getArgumentPrefix());
     $this->assertEquals(false, $this->uriBuilder->getLinkAccessRestrictedPages());
     $this->assertEquals(null, $this->uriBuilder->getTargetPageUid());
     $this->assertEquals(0, $this->uriBuilder->getTargetPageType());
     $this->assertEquals(false, $this->uriBuilder->getNoCache());
     $this->assertEquals(true, $this->uriBuilder->getUseCacheHash());
 }