Add test cases. Requires installation of config.php and settings.txt

This commit is contained in:
2011-06-26 18:23:28 +01:00
parent d41ee43e51
commit 7d3f730fa2
2 changed files with 30 additions and 0 deletions

16
test/autoloader.php Normal file
View File

@@ -0,0 +1,16 @@
<?php
define('HBC_File', 'test');
require_once('test/config.php');
require_once('source/lib/SihnonFramework/Main.class.php');
SihnonFramework_Main::registerAutoloadClasses('SihnonFramework', SihnonFramework_Lib,
'RippingCluster', RippingCluster_Lib);
SihnonFramework_Main::registerAutoloadClasses('Net', RippingCluster_Lib);
assert(class_exists('RippingCluster_Cache', true));
assert(class_exists('Net_Gearman_Job_HandBrake', true));
assert(! class_exists('IDontExist', true));
?>

14
test/path-resolver.php Normal file
View File

@@ -0,0 +1,14 @@
<?php
define('HBC_File', 'test');
require_once('test/config.php');
require_once('source/lib/SihnonFramework/Main.class.php');
var_dump(
SihnonFramework_Main::makeAbsolutePath('source/lib/SihnonFramework/Main.class.php'),
SihnonFramework_Main::makeAbsolutePath('../sihnon-php-lib/source/lib/SihnonFramework/Main.class.php'),
SihnonFramework_Main::makeAbsolutePath('/home/ben/projects/sihnon-php-lib/source/lib/SihnonFramework/Main.class.php')
);
?>