Skip to content

Commit 7c4af23

Browse files
Added bootstrap.php
1 parent 8a454c1 commit 7c4af23

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

phpunit.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
convertWarningsToExceptions="true"
77
processIsolation="false"
88
stopOnFailure="false"
9-
syntaxCheck="false">
9+
syntaxCheck="false"
10+
bootstrap="./tests/bootstrap.php">
1011
<php>
1112
<!--Path to the autoload file that should be used. Use a composer autoloader by default-->
1213
<const name="AUTOLOAD_PATH" value="./vendor/autoload.php"/>

tests/bootstrap.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
ini_set('display_errors', 1);
3+
4+
if (defined("AUTOLOAD_PATH")) {
5+
if (is_file(__DIR__ . '/../' .AUTOLOAD_PATH)) {
6+
$loader = include_once __DIR__ . '/../' . AUTOLOAD_PATH;
7+
} else {
8+
throw new InvalidArgumentException("Cannot load custom autoload file located at ".AUTOLOAD_PATH);
9+
}
10+
}

0 commit comments

Comments
 (0)