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
This commit is contained in:
Ingo Schommer 2016-02-24 22:24:07 +13:00
parent 899ed1c226
commit 7ef575c961

View File

@ -6,6 +6,8 @@ use SilverStripe\BehatExtension\Context\SilverStripeContext,
class SilverStripeContextTest extends \PHPUnit_Framework_TestCase { class SilverStripeContextTest extends \PHPUnit_Framework_TestCase {
protected $backupGlobals = false;
/** /**
* @expectedException \LogicException * @expectedException \LogicException
* @expectedExceptionMessage Cannot find 'region_map' in the behat.yml * @expectedExceptionMessage Cannot find 'region_map' in the behat.yml