Exemplo n.º 1
0
<?php

/**
 * The bootstrap file for unit tests.
 *
 * @author Tomasz "Zyx" Jędrzejewski
 * @copyright Copyright (c) 2009 Invenzzia Group
 * @license http://www.invenzzia.org/license/new-bsd New BSD License
 */
echo "Loading bootstrap...\n";
date_default_timezone_set('Europe/Warsaw');
$config = parse_ini_file(dirname(__FILE__) . '/../paths.ini', true);
require $config['libraries']['Opl'] . 'Base.php';
Opl_Loader::loadPaths($config);
Opl_Loader::setCheckFileExists(false);
Opl_Loader::addLibrary('Extra', array('directory' => './Extra/', 'handler' => null));
Opl_Loader::register();
Exemplo n.º 2
0
 /**
  * @cover Opl_Loader::load
  * @cover Opl_Loader::addLibrary
  */
 public function testLoadWholeNameByBasePath()
 {
     Opl_Loader::addLibrary('Bar', array('basePath' => 'vfs://'));
     ob_start();
     Opl_Loader::load('Bar');
     $this->assertEquals(ob_get_clean(), "BAR.PHP\n");
     return true;
 }
Exemplo n.º 3
0
<?php

/**
 * The bootstrap file for unit tests.
 *
 * @author Tomasz "Zyx" Jędrzejewski
 * @copyright Copyright (c) 2009-2010 Invenzzia Group
 * @license http://www.invenzzia.org/license/new-bsd New BSD License
 */
$config = parse_ini_file(dirname(__FILE__) . '/../paths.ini', true);
require $config['libraries']['Opl'] . 'Opl/Loader.php';
$loader = new Opl_Loader('_');
$loader->addLibrary('Opl', $config['libraries']['Opl']);
$loader->register();
Exemplo n.º 4
0
<?php

/**
 * The bootstrap file for unit tests.
 *
 * @author Tomasz "Zyx" Jędrzejewski
 * @copyright Copyright (c) 2009 Invenzzia Group
 * @license http://www.invenzzia.org/license/new-bsd New BSD License
 */
echo "Loading bootstrap...\n";
$config = parse_ini_file(dirname(__FILE__) . '/../paths.ini', true);
require $config['libraries']['Opl'] . 'Base.php';
Opl_Loader::loadPaths($config);
Opl_Loader::setCheckFileExists(false);
Opl_Loader::addLibrary('Extra', array('directory' => './Extra/', 'handler' => null));
Opl_Loader::addLibrary('Package', array('directory' => './Package/', 'handler' => null));
Opl_Loader::register();