Update bootstrap

This commit is contained in:
Uwe Tews
2015-05-21 00:53:04 +02:00
parent 47b6fab3d9
commit 5bb2c5c26f

View File

@@ -6,17 +6,23 @@
/*
* Smarty PHPUnit Bootstrap
*/
// Locate SmartyBC class and load it
// Locate Autoloader or SmartyBC class and load it
if (is_file(__DIR__ . '/../smarty/libs/Autoloader.php')) {
require_once __DIR__ . '/../smarty/libs/Autoloader.php';
Smarty_Autoloader::register(true);
} elseif (is_file(__DIR__ . '/../libs/Autoloader.php')) {
require_once __DIR__ . '/../libs/Autoloader.php';
Smarty_Autoloader::register(true);
} elseif (is_file(__DIR__ . '/../smarty/libs/SmartyBC.class.php')) {
require_once __DIR__ . '/../smarty/libs/SmartyBC.class.php';
} elseif (is_file(__DIR__ . '/../libs/SmartyBC.class.php')) {
require_once __DIR__ . '/../libs/SmartyBC.class.php';
} else {
throw new Exception('can not locate Smarty distribution');
}
Smarty_Autoloader::register(true);
if (!defined('SMARTY_COMPOSER_INSTALL')) {
foreach (array(__DIR__ . '/../../autoload.php', __DIR__ . '/../vendor/autoload.php', __DIR__ . '/vendor/autoload.php') as $file) {
foreach (array(__DIR__ . '/../../autoload.php', __DIR__ . '/../vendor/autoload.php',
__DIR__ . '/vendor/autoload.php') as $file) {
if (file_exists($file)) {
define('SMARTY_COMPOSER_INSTALL', $file);
break;