Skip to content

Commit e9fd621

Browse files
committed
Skip test when not able to detect vendor/autoload.php
1 parent 061d503 commit e9fd621

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/phpt/error_handler_007.phpt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ ErrorHandler::notify() fatals with a throwing error handler
33
--SKIPIF--
44
<?php
55

6-
// Warning: This relies on the current working directory in which PHPUnit is executed.
6+
if (!file_exists(__DIR__ . "/vendor/autoload.php")) {
7+
die("Skipped: Cannot detect PHPUnit version, run tests from project root.");
8+
}
9+
710
// If the directory is not the root of the project, this will silently fail and execute the test below.
811
require __DIR__ . "/vendor/autoload.php";
912

0 commit comments

Comments
 (0)