Permalink
Browse files

fixed context slowdowns

  • Loading branch information...
1 parent b319d59 commit 011da3c7b4d10c1240e752a637b5e219236748b9 @everzet everzet committed Aug 7, 2011
Showing with 6 additions and 13 deletions.
  1. +6 −13 Context/MinkContext.php
View
@@ -2,6 +2,8 @@
namespace Behat\BehatBundle\Context;
+use Behat\Behat\Event\SuiteEvent;
+
use Behat\Mink\Mink,
Behat\Mink\Behat\Context\BaseMinkContext;
@@ -112,18 +114,9 @@ public function getParameter($name)
*/
public static function initMinkSessions(SuiteEvent $event)
{
- $kernel = $event->getContextParameters();
- self::$mink = $kernel->getContainer()->get('behat.mink');
- }
-
- /**
- * Stops started Mink sessions.
- *
- * @AfterSuite
- */
- public static function stopMinkSessions()
- {
- self::$mink->stopSessions();
- self::$mink = null;
+ if (null === self::$mink) {
+ $kernel = $event->getContextParameters();
+ self::$mink = $kernel->getContainer()->get('behat.mink');
+ }
}
}

0 comments on commit 011da3c

Please sign in to comment.