Created
January 9, 2013 20:01
-
-
Save weaverryan/4496325 to your computer and use it in GitHub Desktop.
Using KernelAwareInterface
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// .. | |
use Behat\Symfony2Extension\Context\KernelAwareInterface; | |
use Symfony\Component\HttpKernel\KernelInterface; | |
class FeatureContext extends MinkContext implements KernelAwareInterface | |
{ | |
private $kernel; | |
public function setKernel(KernelInterface $kernel) | |
{ | |
$this->kernel = $kernel; | |
} | |
protected function getContainer() | |
{ | |
return $this->kernel->getContainer(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment