/**
  * @param Symfony\Component\DependencyInjection\ContainerInterface $container
  * @param Knp\FriendlyContexts\Page\Resolver\PageClassResolver     $pageResolver
  * @param Behat\Mink\Mink                                          $mink
  * @param Behat\Mink\Session                                       $session
  */
 function let($container, $pageResolver, $mink, $session)
 {
     $container->get('friendly.page.resolver')->willReturn($pageResolver);
     $container->has('friendly.page.resolver')->willReturn(true);
     $this->initialize(['page' => ['namespace' => 'Page\\Namespace']], $container);
     $mink->getSession(Argument::cetera())->willReturn($session);
     $this->setMink($mink);
 }
Exemple #2
0
 public function _cleanup()
 {
     $zendOptions = array('httpversion' => '1.1', 'useragent' => 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0a2) Gecko/20110613 Firefox/6.0a2');
     if (isset($this->config['zend'])) {
         array_merge($this->config['zend'], $zendOptions);
     }
     $mink = new \Behat\Mink\Mink(array('primary' => new \Behat\Mink\Session(new \Behat\Mink\Driver\GoutteDriver(new \Goutte\Client($zendOptions)))));
     $this->session = $mink->getSession('primary');
 }