Skip to content

Commit

Permalink
Fix SKIPIF conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Sep 8, 2018
1 parent e69b413 commit d43ebe6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions tests/end-to-end/regression/GitHub/2085-without-invoker.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ Test CLI flags --enforce-time-limit --default-time-limit without php-invoker, wi
https://github.com/sebastianbergmann/phpunit/issues/2085
--SKIPIF--
<?php
if (\class_exists(Invoker::class)) {
require __DIR__ . '/../../../bootstrap.php';

if (\class_exists(SebastianBergmann\Invoker\Invoker::class)) {
print "Skip: package phpunit/php-invoker is installed" . PHP_EOL;
}

Expand All @@ -16,7 +18,7 @@ if (!\extension_loaded('pcntl') || \strpos(\ini_get('disable_functions'), 'pcntl
$_SERVER['argv'][1] = '--no-configuration';
$_SERVER['argv'][2] = '--enforce-time-limit';
$_SERVER['argv'][3] = '--default-time-limit=10';
$_SERVER['argv'][4] = __DIR__ . '/Issue2085Test.php';
$_SERVER['argv'][4] = __DIR__ . '/2085/Issue2085Test.php';

require __DIR__ . '/../../../bootstrap.php';
PHPUnit\TextUI\Command::main();
Expand Down
6 changes: 4 additions & 2 deletions tests/end-to-end/regression/GitHub/2085.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ Test CLI flags --enforce-time-limit --default-time-limit
https://github.com/sebastianbergmann/phpunit/issues/2085
--SKIPIF--
<?php
if (!\class_exists(Invoker::class)) {
require __DIR__ . '/../../../bootstrap.php';

if (!\class_exists(SebastianBergmann\Invoker\Invoker::class)) {
print "Skip: package phpunit/php-invoker is required for enforcing time limits" . PHP_EOL;
}

Expand All @@ -16,7 +18,7 @@ if (!\extension_loaded('pcntl') || \strpos(\ini_get('disable_functions'), 'pcntl
$_SERVER['argv'][1] = '--no-configuration';
$_SERVER['argv'][2] = '--enforce-time-limit';
$_SERVER['argv'][3] = '--default-time-limit=1';
$_SERVER['argv'][4] = __DIR__ . '/Issue2085Test.php';
$_SERVER['argv'][4] = __DIR__ . '/2085/Issue2085Test.php';

require __DIR__ . '/../../../bootstrap.php';
PHPUnit\TextUI\Command::main();
Expand Down

0 comments on commit d43ebe6

Please sign in to comment.