Skip to content

Commit

Permalink
Implement skip-if condition for tests that rely on unaltered debug ou…
Browse files Browse the repository at this point in the history
…tput
  • Loading branch information
epdenouden authored and sebastianbergmann committed Jan 2, 2024
1 parent 6044de3 commit 2b221e0
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
--TEST--
The right exception is raised when TestMethodBuilder::fromCallStack() cannot find a TestCase object
--SKIPIF--
<?php if(str_contains((string)ini_get('xdebug.mode'), 'develop')) {
print 'skip: xdebug.mode=develop is enabled';
}
--FILE--
<?php declare(strict_types=1);
require __DIR__ . '/../../bootstrap.php';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
--TEST--
phpunit ../../_files/UnexpectedOutputTest.php
--SKIPIF--
<?php if(str_contains((string)ini_get('xdebug.mode'), 'develop')) {
print 'skip: xdebug.mode=develop is enabled';
}
--FILE--
<?php declare(strict_types=1);
$_SERVER['argv'][] = '--do-not-cache-result';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
--TEST--
phpunit ../../_files/UnexpectedOutputTest.php
--SKIPIF--
<?php if(str_contains((string)ini_get('xdebug.mode'), 'develop')) {
print 'skip: xdebug.mode=develop is enabled';
}
--FILE--
<?php declare(strict_types=1);
$_SERVER['argv'][] = '--do-not-cache-result';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
--TEST--
Iterable return types should return empty array by default
--SKIPIF--
<?php if(str_contains((string)ini_get('xdebug.mode'), 'develop')) {
print 'skip: xdebug.mode=develop is enabled';
}
--FILE--
<?php declare(strict_types=1);
interface Foo
Expand Down
4 changes: 4 additions & 0 deletions tests/end-to-end/phpt/expect-location-hint.phpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
--TEST--
PHPT EXPECT comparison returns correct code location hint
--SKIPIF--
<?php if(str_contains((string)ini_get('xdebug.mode'), 'develop')) {
print 'skip: xdebug.mode=develop is enabled';
}
--FILE--
<?php declare(strict_types=1);
$_SERVER['argv'][] = '--do-not-cache-result';
Expand Down
4 changes: 4 additions & 0 deletions tests/end-to-end/regression/5278.phpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
--TEST--
https://github.com/sebastianbergmann/phpunit/issues/5278
--SKIPIF--
<?php if(str_contains((string)ini_get('xdebug.mode'), 'develop')) {
print 'skip: xdebug.mode=develop is enabled';
}
--FILE--
<?php declare(strict_types=1);
$_SERVER['argv'][] = '--do-not-cache-result';
Expand Down
4 changes: 4 additions & 0 deletions tests/end-to-end/regression/5451.phpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
--TEST--
https://github.com/sebastianbergmann/phpunit/issues/5451
--SKIPIF--
<?php if(str_contains((string)ini_get('xdebug.mode'), 'develop')) {
print 'skip: xdebug.mode=develop is enabled';
}
--FILE--
<?php declare(strict_types=1);
$_SERVER['argv'][] = '--do-not-cache-result';
Expand Down
4 changes: 4 additions & 0 deletions tests/end-to-end/regression/765.phpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
--TEST--
GH-765: Fatal error triggered in PHPUnit when exception is thrown in data provider of a test with a dependency
--SKIPIF--
<?php if(str_contains((string)ini_get('xdebug.mode'), 'develop')) {
print 'skip: xdebug.mode=develop is enabled';
}
--FILE--
<?php declare(strict_types=1);
$_SERVER['argv'][] = '--do-not-cache-result';
Expand Down

0 comments on commit 2b221e0

Please sign in to comment.