Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.