getRequest() public method

Returns the current Request instance.
public getRequest ( ) : Symfony\Component\BrowserKit\Request
return Symfony\Component\BrowserKit\Request A Request instance
Exemplo n.º 1
0
 /**
  * {@inheritdoc}
  *
  * @return Request|null A Request instance
  */
 public function getRequest()
 {
     return parent::getRequest();
 }
Exemplo n.º 2
0
 /**
  * @param $client
  * @param $position 0 based index position
  * @return mixed
  */
 private function getPageEditUriFromListByPosition(Client $client, $position)
 {
     $crawler = $client->getCrawler();
     if (strpos($client->getRequest()->getUri(), '/admin/cmf/page/page/list') === false) {
         $crawler = $client->request('GET', '/admin/cmf/page/page/list');
     }
     $this->assertTrue($client->getResponse()->isSuccessful());
     $rows = $crawler->filter('table tbody tr');
     return $rows->eq($position)->filter('td')->eq(1)->filter('a')->attr('href');
 }