Enabled phpunit, updates for ab_setup, enabled APC, and other todos

This commit is contained in:
Deon George
2012-08-23 20:14:46 +10:00
parent 878c159e3a
commit 23247a5d4e
8 changed files with 53 additions and 27 deletions

View File

@@ -14,13 +14,15 @@ $application = 'application';
*/
$modules = 'modules';
$sysmodules = 'includes/kohana/modules';
/**
* The directory in which the Kohana resources are located. The system
* directory must contain the classes/kohana.php file.
*
* @see http://kohanaframework.org/guide/about.install#system
*/
$system = 'system';
$system = 'includes/kohana/system';
/**
* The default extension of resource files. If you change this, all resources
@@ -67,6 +69,12 @@ if ( ! is_dir($modules) AND is_dir(DOCROOT.$modules))
$modules = DOCROOT.$modules;
}
// Make the system relative to the docroot, for symlink'd index.php
if ( ! is_dir($sysmodules) AND is_dir(DOCROOT.$sysmodules))
{
$sysmodules = DOCROOT.$sysmodules;
}
// Make the system relative to the docroot
if ( ! is_dir($system) AND is_dir(DOCROOT.$system))
{
@@ -76,10 +84,11 @@ if ( ! is_dir($system) AND is_dir(DOCROOT.$system))
// Define the absolute paths for configured directories
define('APPPATH', realpath($application).DIRECTORY_SEPARATOR);
define('MODPATH', realpath($modules).DIRECTORY_SEPARATOR);
define('SMDPATH', realpath($sysmodules).DIRECTORY_SEPARATOR);
define('SYSPATH', realpath($system).DIRECTORY_SEPARATOR);
// Clean up the configuration vars
unset($application, $modules, $system);
unset($application, $modules, $sysmodules, $system);
/**
* Define the start time of the application, used for profiling.
@@ -97,8 +106,10 @@ if ( ! defined('KOHANA_START_MEMORY'))
define('KOHANA_START_MEMORY', memory_get_usage());
}
define('PHPUNITTEST','10.1.3.242');
// Bootstrap the application
require APPPATH.'bootstrap'.EXT;
// Enable the unittest module
Kohana::modules(Kohana::modules() + array('unittest' => MODPATH.'unittest'));
Kohana::modules(Kohana::modules() + array('unittest' => MODPATH.'unittest'));

View File

@@ -249,7 +249,7 @@ class Kohana_CoreTest extends Unittest_TestCase
return array(
array(array(), array()),
array(array('unittest' => MODPATH.'fo0bar'), array()),
array(array('unittest' => MODPATH.'unittest'), array('unittest' => $this->dirSeparator(MODPATH.'unittest/'))),
array(array('unittest' => SMDPATH.'unittest'), array('unittest' => $this->dirSeparator(SMDPATH.'unittest/'))),
);
}