Permalink
Browse files

Added core/application unit tests

Updated module dependency management & loading

Signed-off-by: Gregory PLANCHAT <g.planchat@gmail.com>
  • Loading branch information...
gplanchat committed Sep 28, 2010
1 parent 5b74e9e commit 69d5565f58d92736499fe9d3438a46714c968c22
View
@@ -7,3 +7,15 @@
[submodule "test/externals/libraries/php-file-iterator"]
path = test/externals/libraries/php-file-iterator
url = git://github.com/sebastianbergmann/php-file-iterator.git
+[submodule "test/externals/libraries/php-token-stream"]
+ path = test/externals/libraries/php-token-stream
+ url = git://github.com/sebastianbergmann/php-token-stream.git
+[submodule "test/externals/libraries/phpunit-mock-objects"]
+ path = test/externals/libraries/phpunit-mock-objects
+ url = git://github.com/sebastianbergmann/phpunit-mock-objects.git
+[submodule "test/externals/libraries/php-text-template"]
+ path = test/externals/libraries/php-text-template
+ url = git://github.com/sebastianbergmann/php-text-template.git
+[submodule "test/externals/libraries/php-timer"]
+ path = test/externals/libraries/php-timer
+ url = git://github.com/sebastianbergmann/php-timer.git
View
@@ -203,7 +203,6 @@ public static function app()
$modulePath = sprintf($pathPattern, $moduleConfig['codePool'], str_replace('_', DS, $moduleName));
self::_registerModule(self::getFrontController(), self::getRouter(), $moduleName, $moduleConfig, $modulePath);
}
- var_dump(self::getFrontController()->getControllerDirectory());
self::getFrontController()->setDefaultModule('One_Core');
$dispatcher = self::getFrontController()->getDispatcher();
@@ -294,15 +293,14 @@ private static function _inflectClassName($className, $domain)
$inflector = new One_Core_Model_Inflector();
}
- $domain = str_replace('.', '/', $domain);
-
$offset = strpos($className, '/');
$module = substr($className, 0, $offset);
$class = substr($className, $offset + 1);
- self::getConfig("{$domain}/{$module}/rewrite")
+// self::getConfig("{$domain}/{$module}/rewrite")
- if (($namespace = self::getConfig("{$domain}/{$module}/namespace")) !== null) {
+ $xmlDomain = str_replace('.', '/', $domain);
+ if (($namespace = self::getConfig("{$xmlDomain}/{$module}/namespace")) !== null) {
return $namespace . '_' . $inflector->filter($class);
}
@@ -28,7 +28,6 @@
*
*/
-require_once 'Nova/Core/Exception.php';
/**
* Invalid method call exception, thrown when :
* - a configuration parameter is missing
@@ -28,7 +28,6 @@
*
*/
-require_once 'Nova/Core/Exception.php';
/**
* Invalid method call exception, thrown when :
* - conneciton to the database could not be set up
@@ -28,7 +28,6 @@
*
*/
-require_once 'Nova/Core/Exception.php';
/**
* Invalid method call exception, thrown when :
* - supplied conneciton name could not be found by the conneciton pool
@@ -28,7 +28,6 @@
*
*/
-require_once 'Nova/Core/Exception.php';
/**
* Invalid method call exception, thrown when :
* - Desired database resource is not found
@@ -28,7 +28,6 @@
*
*/
-require_once 'Nova/Core/Exception.php';
/**
* Invalid implementation, thrown when :
* - a class instanciated by Nova object forgeries does not implement the
@@ -28,7 +28,6 @@
*
*/
-require_once 'Nova/Core/Exception.php';
/**
* Invalid method call exception, thrown when :
* - at least one constructor param is missing or is invalid
@@ -28,7 +28,6 @@
*
*/
-require_once 'Nova/Core/Exception.php';
/**
* Invalid method call exception, thrown when :
* - an inexistent method is called
@@ -28,7 +28,6 @@
*
*/
-require_once 'Nova/Core/Exception.php';
/**
* Unimplemented method/function/algorithm exception, thrown when :
* - desired functionality isn't yet impelmented
Oops, something went wrong.

0 comments on commit 69d5565

Please sign in to comment.