mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-01 22:40:39 +02:00
Merge branch 'develop-olympus' into develop
This commit also ports all ascraeus tests to the new format. Conflicts: tests/all_tests.php tests/network/all_tests.php tests/request/all_tests.php tests/request/request_var.php tests/template/templates/includephp.html
This commit is contained in:
@@ -1,41 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* @package testing
|
||||
* @copyright (c) 2008 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('PHPUnit_MAIN_METHOD'))
|
||||
{
|
||||
define('PHPUnit_MAIN_METHOD', 'phpbb_class_loader_all_tests::main');
|
||||
}
|
||||
|
||||
require_once 'test_framework/framework.php';
|
||||
require_once 'PHPUnit/TextUI/TestRunner.php';
|
||||
|
||||
require_once 'class_loader/class_loader_test.php';
|
||||
|
||||
class phpbb_class_loader_all_tests
|
||||
{
|
||||
public static function main()
|
||||
{
|
||||
PHPUnit_TextUI_TestRunner::run(self::suite());
|
||||
}
|
||||
|
||||
public static function suite()
|
||||
{
|
||||
$suite = new PHPUnit_Framework_TestSuite('phpBB Class Loader');
|
||||
|
||||
$suite->addTestSuite('phpbb_class_loader_test');
|
||||
|
||||
return $suite;
|
||||
}
|
||||
}
|
||||
|
||||
if (PHPUnit_MAIN_METHOD == 'phpbb_class_loader_all_tests::main')
|
||||
{
|
||||
phpbb_class_loader_all_tests::main();
|
||||
}
|
||||
|
@@ -8,17 +8,15 @@
|
||||
*
|
||||
*/
|
||||
|
||||
require_once 'test_framework/framework.php';
|
||||
require_once 'class_loader/cache_mock.php';
|
||||
|
||||
require_once '../phpBB/includes/class_loader.php';
|
||||
require_once __DIR__ . '/cache_mock.php';
|
||||
|
||||
require_once __DIR__ . '/../../phpBB/includes/class_loader.php';
|
||||
|
||||
class phpbb_class_loader_test extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
public function test_resolve_path()
|
||||
{
|
||||
$prefix = 'class_loader/';
|
||||
$prefix = __DIR__ . '/';
|
||||
$class_loader = new phpbb_class_loader($prefix);
|
||||
|
||||
$prefix .= 'includes/';
|
||||
@@ -56,7 +54,7 @@ class phpbb_class_loader_test extends PHPUnit_Framework_TestCase
|
||||
$cache = new phpbb_cache_mock;
|
||||
$cache->put('class_loader', array('phpbb_a_cached_name' => 'a/cached_name'));
|
||||
|
||||
$prefix = 'class_loader/';
|
||||
$prefix = __DIR__ . '/';
|
||||
$class_loader = new phpbb_class_loader($prefix, '.php', $cache);
|
||||
|
||||
$prefix .= 'includes/';
|
||||
|
Reference in New Issue
Block a user