mirror of
https://github.com/vlucas/valitron.git
synced 2025-12-31 15:11:53 +00:00
19 lines
671 B
PHP
19 lines
671 B
PHP
<?php
|
|
error_reporting(-1);
|
|
date_default_timezone_set('UTC');
|
|
|
|
/**
|
|
* Path trickery ensures test suite will always run, standalone or within
|
|
* another composer package. Designed to find composer autoloader and require
|
|
*/
|
|
$vendorPos = strpos(__DIR__, 'vendor/vlucas/valitron');
|
|
if($vendorPos !== false) {
|
|
// Package has been cloned within another composer package, resolve path to autoloader
|
|
$vendorDir = substr(__DIR__, 0, $vendorPos) . 'vendor/';
|
|
$loader = require $vendorDir . 'autoload.php';
|
|
} else {
|
|
// Package itself (cloned standalone)
|
|
$loader = require __DIR__.'/../vendor/autoload.php';
|
|
}
|
|
|
|
require_once __DIR__ . '/Valitron/BaseTestCase.php'; |