Example #1
0
 /**
  * Ensures the setPathInfo method allows setting of a path
  *
  * @return void
  *
  * @test
  */
 public function setPathInfoAllowsSettingOfPathInfo()
 {
     $path = uniqid() . '/' . uniqid() . '/' . uniqid();
     $parts = explode('/', $path);
     $request = new \Request($this->config, []);
     $request->setPathInfo($path);
     $this->assertEquals($path, $request->getPathInfo());
     $this->assertEquals($path, $request->path_info);
     $this->assertEquals($parts[0], $request->getUrlElement(0));
     $this->assertEquals($parts[1], $request->getUrlElement(1));
     $this->assertEquals($parts[2], $request->getUrlElement(2));
 }