From 7aca9a143f78490231808c5504b2ea3917d2f46e Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Fri, 12 Apr 2019 08:06:43 +1000 Subject: [PATCH] (NFC) Ensure phpcs ignores eval notice in these files as it is required --- Civi/Test/CiviTestListener.php | 4 ++++ tests/phpunit/CiviTest/bootstrap.php | 2 ++ 2 files changed, 6 insertions(+) diff --git a/Civi/Test/CiviTestListener.php b/Civi/Test/CiviTestListener.php index 255eb8628f..9c2a10beac 100644 --- a/Civi/Test/CiviTestListener.php +++ b/Civi/Test/CiviTestListener.php @@ -169,11 +169,15 @@ class CiviTestListener extends \PHPUnit_Framework_BaseTestListener { } elseif (!empty($byInterface['HeadlessInterface'])) { putenv('CIVICRM_UF=UnitTests'); + // phpcs:disable eval($this->cv('php:boot --level=full', 'phpcode')); + // phpcs:enable } elseif (!empty($byInterface['EndToEndInterface'])) { putenv('CIVICRM_UF='); + // phpcs:disable eval($this->cv('php:boot --level=full', 'phpcode')); + // phpcs:enable } $blurb = "Tip: Run the headless tests and end-to-end tests separately, e.g.\n" diff --git a/tests/phpunit/CiviTest/bootstrap.php b/tests/phpunit/CiviTest/bootstrap.php index d50ff31fad..5a05bcabf9 100644 --- a/tests/phpunit/CiviTest/bootstrap.php +++ b/tests/phpunit/CiviTest/bootstrap.php @@ -16,7 +16,9 @@ if (file_exists('/etc/timezone')) { # Crank up the memory ini_set('memory_limit', '2G'); define('CIVICRM_TEST', 1); +// phpcs:disable eval(cv('php:boot --level=settings', 'phpcode')); +// phpcs:enable if (CIVICRM_UF === 'UnitTests') { Civi\Test::headless()->apply(); -- 2.25.1