Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
The Symfony2Extension
<?php
// ...
use Behat\MinkExtension\Context\MinkContext;
use Behat\Symfony2Extension\Context\KernelAwareInterface;
use Symfony\Component\HttpKernel\KernelInterface;
class FeatureContext extends MinkContext implements KernelAwareInterface
{
private $kernel;
/**
* Sets Kernel instance.
*
* @param KernelInterface $kernel HttpKernel instance
*/
public function setKernel(KernelInterface $kernel)
{
$this->kernel = $kernel;
}
/**
* @return \Symfony\Component\DependencyInjection\ContainerInterface
*/
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
You can’t perform that action at this time.