diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-02-21 11:51:52 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-02-21 11:51:52 +0100 |
commit | 9aeeb2605bf7a77886004be076cf6729b34a7722 (patch) | |
tree | a46d3f12e6b12616c1f831f4a19d27d8b1978c94 /tests/bootstrap.php | |
parent | 906c0e7798cea15ad66bfa3149341e0be7c715e4 (diff) | |
download | nextcloud-server-9aeeb2605bf7a77886004be076cf6729b34a7722.tar.gz nextcloud-server-9aeeb2605bf7a77886004be076cf6729b34a7722.zip |
Check for PHP configuration before executing unit tests
Diffstat (limited to 'tests/bootstrap.php')
-rw-r--r-- | tests/bootstrap.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 8dd7784d430..e1dc1076a4f 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -1,6 +1,4 @@ <?php - - define('PHPUNIT_RUN', 1); $configDir = getenv('CONFIG_DIR'); @@ -8,6 +6,11 @@ if ($configDir) { define('PHPUNIT_CONFIG_DIR', $configDir); } +if(version_compare(phpversion(), '5.6.0', '>=') && + ini_get('always_populate_raw_post_data') !== '-1') { + throw new Exception("'always_populate_raw_post_data' has to be set to '-1' in your php.ini"); +} + require_once __DIR__ . '/../lib/base.php'; // load minimum set of apps |