Example #1
0
 public function testGettingPathSections()
 {
     global $_SERVER;
     $_SERVER['REQUEST_URI'] = '/foo/bar/?hello=world';
     $_SERVER['REQUEST_METHOD'] = 'POST';
     $_SERVER['HTTP_USER_AGENT'] = '';
     $request = new Request();
     $this->assertEquals($request->getPathSections(), ['foo', 'bar']);
 }