/**
  * Initializes context.
  *
  * @param   Symfony\Component\HttpKernel\HttpKernelInterface   $kernel  application kernel
  */
 public function __construct(HttpKernelInterface $kernel)
 {
     $this->kernel = $kernel;
     if (null === self::$mink) {
         self::$mink = $this->getContainer()->get('behat.mink');
         $this->registerSessions(self::$mink);
     }
 }
예제 #2
0
 /**
  * Initializes Mink instance and sessions.
  *
  * @param   Behat\Behat\Event\SuiteEvent $event
  *
  * @BeforeSuite
  */
 public static function initMinkSessions(SuiteEvent $event)
 {
     if (null === self::$mink) {
         $kernel = $event->getContextParameters();
         self::$mink = $kernel->getContainer()->get('behat.mink');
     }
 }