From 7ef575c961ef8a42646b9a30d5a37ad125290dce Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Wed, 24 Feb 2016 22:24:07 +1300 Subject: [PATCH] Don't use PHPUnit backupGlobals, break with 4.x Unclear why PHPUnit is trying to serialize() data through its mocking system, but this simple workaround avoids it. https://phpunit.de/manual/4.8/en/fixtures.html#fixtures.global-state https://github.com/sebastianbergmann/phpunit/issues/451 http://stackoverflow.com/questions/4366592/symfony-2-doctrine-2-phpunit-3-5-serialization-of-closure-exception --- tests/Context/SilverStripeContextTest.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/Context/SilverStripeContextTest.php b/tests/Context/SilverStripeContextTest.php index 7ba40abf..c4d500e4 100644 --- a/tests/Context/SilverStripeContextTest.php +++ b/tests/Context/SilverStripeContextTest.php @@ -6,6 +6,8 @@ class SilverStripeContextTest extends \PHPUnit_Framework_TestCase { + protected $backupGlobals = false; + /** * @expectedException \LogicException * @expectedExceptionMessage Cannot find 'region_map' in the behat.yml