public setSection ( string $section ) : |
||
$section | string | |
return | the current UriBuilder to allow method chaining |
public function setSection($section)
{
$this->section = $section;
return $this;
}
/** * @test */ public function buildAppendsSectionIfSectionIsSpecified() { $this->mockRouter->expects($this->once())->method('resolve')->will($this->returnValue('resolvedUri')); $this->uriBuilder->setSection('SomeSection'); $expectedResult = 'resolvedUri#SomeSection'; $actualResult = $this->uriBuilder->build(); $this->assertEquals($expectedResult, $actualResult); }