<?php $root = dirname(dirname(__DIR__)); $config = array('pear_path' => '/usr/share/pear', 'test_directory' => "{$root}/app/test", 'store_statistics' => false, 'db' => array('plugin' => '\\app\\lib\\PDO_MySQL', 'database' => 'vpu', 'host' => 'localhost', 'port' => '3306', 'username' => 'root', 'password' => 'admin'), 'create_snapshots' => false, 'snapshot_directory' => "{$root}/app/history/", 'sandbox_errors' => false, 'error_reporting' => E_ALL | E_STRICT, 'ignore_hidden_folders' => true, 'xml_configuration_file' => false, 'usable_group_names' => array('DefaultTestGroup'), 'bootstraps' => array()); set_include_path(get_include_path() . PATH_SEPARATOR . $root . PATH_SEPARATOR . $config['pear_path']); require_once 'PHPUnit/Autoload.php'; require_once 'PHPUnit/Util/Log/JSON.php'; spl_autoload_register(function ($class) use($root) { $class = str_replace('\\', '/', $class); $file = "{$root}/{$class}.php"; if (file_exists($file)) { require $file; } }); foreach ($config['bootstraps'] as $bootstrap) { require $bootstrap; } \app\lib\Library::store($config);
/** * VisualPHPUnit * * VisualPHPUnit is a visual front-end for PHPUnit. * * PHP Version 5.3< * * @author Nick Sinopoli <*****@*****.**> * @copyright 2011-2015 VisualPHPUnit * @license http://opensource.org/licenses/BSD-3-Clause The BSD License * @link https://github.com/VisualPHPUnit/VisualPHPUnit VisualPHPUnit */ use app\lib\Library; $root = dirname(dirname(__DIR__)); $config = array('composer_vendor_path' => $root . '/vendor', 'test_directories' => array('Sample Tests' => "{$root}/app/testphpunit"), 'store_statistics' => false, 'db' => array('plugin' => '\\app\\lib\\PDOMySQL', 'database' => 'vpu', 'host' => 'localhost', 'port' => '3306', 'username' => 'root', 'password' => ''), 'create_snapshots' => false, 'snapshot_directory' => "{$root}/app/history/", 'sandbox_errors' => false, 'error_reporting' => E_ALL | E_STRICT, 'ignore_hidden_folders' => true, 'xml_configuration_files' => array(), 'bootstraps' => array()); set_include_path(get_include_path() . PATH_SEPARATOR . $root . PATH_SEPARATOR . $config['composer_vendor_path'] . PATH_SEPARATOR . $config['composer_vendor_path'] . '/phpunit/phpunit/src'); require_once 'autoload.php'; require_once 'Util/Log/JSON.php'; spl_autoload_register(function ($class) use($root) { $class = str_replace('\\', '/', $class); $file = "{$root}/{$class}.php"; if (file_exists($file)) { require $file; } }); foreach ($config['bootstraps'] as $bootstrap) { require $bootstrap; } Library::store($config);