Skip to content

Instantly share code, notes, and snippets.

@MugeSo
Created October 29, 2012 02:41
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MugeSo/3971150 to your computer and use it in GitHub Desktop.
Save MugeSo/3971150 to your computer and use it in GitHub Desktop.
How to use "Diggin - Guzzle AutoCharsetEncoding plugin" with Behat MinkExtension
use Behat\MinkExtension\Context\MinkContext;
use Diggin\Bridge\Guzzle\AutoCharsetEncodingPlugin\AutoCharsetEncodingPlugin;
class FeatureContext extends MinkContext
{
/* ommitted */
/**
* @BeforeScenario
*/
public function onBeforeScenario()
{
$autoCharsetEncodingPlugin = new AutoCharsetEncodingPlugin;
$this->getSession()->getDriver()->getClient()->getClient()->getEventDispatcher()->addSubscriber($autoCharsetEncodingPlugin);
}
/* ommitted */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment