Skip to content

Instantly share code, notes, and snippets.

@RedDevilHat
Created November 24, 2016 10:37
Show Gist options
  • Save RedDevilHat/4543bce0863b8075435199f5daf10b92 to your computer and use it in GitHub Desktop.
Save RedDevilHat/4543bce0863b8075435199f5daf10b92 to your computer and use it in GitHub Desktop.
<?php
use Dredd\Hooks;
use dredd\DreddHooksHelper;
require_once 'DreddHooksHelper.php';
$cookie = null;
Hooks::beforeAll(function(&$transaction) use ($cookie){
$helper = new DreddHooksHelper();
$cookie = $helper->getUserCookie();
});
Hooks::beforeEach(function(&$transaction) use ($cookie) {
$transaction->request->headers->Cookie = $cookie;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment