Created
November 5, 2014 14:40
-
-
Save agarzon/0d888a431eb24e9913ff to your computer and use it in GitHub Desktop.
CakePHP helper for Codeception (Unit testing)
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 | |
namespace Codeception\Module; | |
class CakePHPHelper extends \Codeception\Module | |
{ | |
public function __construct() | |
{ | |
define('APP_DIR', 'app'); | |
define('DS', DIRECTORY_SEPARATOR); | |
define('ROOT', getcwd()); | |
define('WEBROOT_DIR', 'webroot'); | |
define('WWW_ROOT', ROOT . DS . APP_DIR . DS . WEBROOT_DIR . DS); | |
if (!defined('CAKE_CORE_INCLUDE_PATH')) { | |
define('CAKE_CORE_INCLUDE_PATH', ROOT . DS . 'lib'); | |
} | |
require CAKE_CORE_INCLUDE_PATH . DS . 'Cake' . DS . 'bootstrap.php'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To know more: Codeception/Codeception#561