Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(NFC) Ensure phpcs ignores eval notice in these files as it is required #14032

Merged
merged 1 commit into from
Apr 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Civi/Test/CiviTestListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,15 @@ protected function autoboot($byInterface) {
}
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"
Expand Down
2 changes: 2 additions & 0 deletions tests/phpunit/CiviTest/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
# 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();
Expand Down