Skip to content

Commit

Permalink
use a closure
Browse files Browse the repository at this point in the history
  • Loading branch information
AD7six committed Nov 17, 2014
1 parent 2add315 commit f498388
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Template/Bake/tests/bootstrap.ctp
Expand Up @@ -23,7 +23,7 @@
/**
* Test suite bootstrap for <%= $plugin %>.
*/
function find_root($root) {
$findRoot = function($root) {
do {
$lastRoot = $root;
$root = dirname($root);
Expand All @@ -33,9 +33,9 @@ function find_root($root) {
} while($root !== $lastRoot);

throw new Exception("Cannot find the root of the application, unable to run tests");
}

$root = find_root(__FILE__);
};
$root = $findRoot(__FILE__);
unset($findRoot);

chdir($root);
require $root . '/config/bootstrap.php';

0 comments on commit f498388

Please sign in to comment.