Skip to content

Commit

Permalink
Add autoloaders for testapp and test plugins.
Browse files Browse the repository at this point in the history
Adding these to cakephp's composer.json will cause those files to be
accessible from the application which is bad. Use the core class loader
to bind these namespaces.
  • Loading branch information
markstory committed Sep 9, 2013
1 parent 67e3a09 commit 44b31a0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/Cake/Test/init.php
Expand Up @@ -36,6 +36,8 @@
define('WWW_ROOT', APP . WEBROOT_DIR . DS);
define('TESTS', APP . 'Test' . DS);

define('TEST_APP', ROOT . '/lib/Cake/Test/TestApp/');

//@codingStandardsIgnoreStart
@mkdir(LOGS);
@mkdir(CACHE);
Expand All @@ -47,6 +49,9 @@

(new Cake\Core\ClassLoader('Cake', dirname(dirname(__DIR__)) ))->register();
(new Cake\Core\ClassLoader('TestApp', dirname(__DIR__) . '/Test'))->register();
(new Cake\Core\ClassLoader('TestPlugin', CAKE . '/Test/TestApp/Plugin/'))->register();
(new Cake\Core\ClassLoader('TestPluginTwo', CAKE . '/Test/TestApp/Plugin/'))->register();
(new Cake\Core\ClassLoader('PluginJs', CAKE . '/Test/TestApp/Plugin/'))->register();

require CORE_PATH . 'Cake/bootstrap.php';

Expand All @@ -65,6 +70,7 @@
'imageBaseUrl' => 'img/',
'jsBaseUrl' => 'js/',
'cssBaseUrl' => 'css/',
'pluginPath' => TEST_APP . 'Plugin/',
]);

Cache::config([
Expand Down

0 comments on commit 44b31a0

Please sign in to comment.