Skip to content

Commit fe818b8

Browse files
committed
Simplified code.
1 parent 62c12ef commit fe818b8

1 file changed

Lines changed: 8 additions & 15 deletions

File tree

tests/bootstrap.php

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,14 @@
77
* @author Sebastian Mordziol <s.mordziol@mistralys.eu>
88
*/
99

10-
/**
11-
* The tests root folder (this file's location)
12-
* @var string
13-
*/
14-
define('TESTS_ROOT', __DIR__ );
10+
declare(strict_types=1);
1511

16-
$autoloader = realpath(TESTS_ROOT.'/../vendor/autoload.php');
17-
18-
if($autoloader === false)
19-
{
20-
die('ERROR: The autoloader is not present. Run composer install first.');
21-
}
12+
$autoloader = __DIR__.'/../vendor/autoload.php';
2213

23-
/**
24-
* The composer autoloader
25-
*/
26-
require_once $autoloader;
14+
if(!file_exists($autoloader))
15+
{
16+
die('ERROR: The autoloader is not present. Run composer install first.');
17+
}
18+
19+
require_once $autoloader;
2720

0 commit comments

Comments
 (0)