setRelativeUrl() public method

Sets the relative URL (only path component) of the item.
public setRelativeUrl ( string $url )
$url string The relative URL. e.g: /about/me/index.html
Exemplo n.º 1
0
 /**
  * @expectedException \RuntimeException
  */
 public function testUrlWithoutStartWithSlash()
 {
     $item = new Item('Test of content', 'index.html', ['title' => 'My posts']);
     $event = new RenderEvent($item, Item::SNAPSHOT_RAW, Item::SNAPSHOT_PATH_RELATIVE);
     $event->setRelativeUrl('index.html');
 }