Skip to content

Commit

Permalink
Autoload Cake\ namespace when running tests.
Browse files Browse the repository at this point in the history
This means you don't have to use composer to install/run phpunit before
you can run the core tests which is nice.
  • Loading branch information
markstory committed Sep 9, 2013
1 parent d44504d commit 425d35c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/Cake/Test/init.php
Expand Up @@ -43,6 +43,11 @@
@mkdir(CACHE . 'models');
//@codingStandardsIgnoreEnd

require CORE_PATH . 'Cake/Core/ClassLoader.php';

(new Cake\Core\ClassLoader('Cake', dirname(dirname(__DIR__)) ))->register();
(new Cake\Core\ClassLoader('TestApp', dirname(__DIR__) . '/Test'))->register();

require CORE_PATH . 'Cake/bootstrap.php';

mb_internal_encoding('UTF-8');
Expand Down Expand Up @@ -95,5 +100,3 @@
]
]);

$autoloader = new Cake\Core\ClassLoader('TestApp', dirname(__DIR__) . '/Test');
$autoloader->register();

0 comments on commit 425d35c

Please sign in to comment.