Created
August 13, 2016 16:47
-
-
Save jtraulle/9b0bb8759d069914a2a7c6c10b680313 to your computer and use it in GitHub Desktop.
Bootstrap codeception cakephp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Here you can initialize variables that will be available to your tests, e.g. the app's bootstrap.php | |
$findRoot = function ($root) { | |
do { | |
$lastRoot = $root; | |
$root = dirname($root); | |
if (is_dir($root . '/vendor/cakephp/cakephp')) { | |
return $root; | |
} | |
} while ($root !== $lastRoot); | |
throw new Exception("Cannot find the root of the application, unable to run tests"); | |
}; | |
$root = $findRoot(__FILE__); | |
unset($findRoot); | |
chdir($root); | |
require $root . '/config/bootstrap.php'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment