silverstripe-cms/tests/bootstrap/mysite.php
Sam Minnee bf9939e32c NEW: Refactor test bootstrap to be more modular.
The test bootstrap is broken into units that can be combined for
different test situations:

 - phpunit
 - behat
 - serve
2016-10-28 17:47:53 +13:00

15 lines
398 B
PHP

<?php
// Mock mysite if not installed with silverstripe/installer
if (defined('BASE_PATH')) {
$projectPath = BASE_PATH . '/mysite';
} else {
$projectPath = getcwd() . '/mysite';
}
if (!is_dir($projectPath)) {
mkdir($projectPath, 02775);
mkdir($projectPath.'/code', 02775);
mkdir($projectPath.'/_config', 02775);
copy(__DIR__.'/fixtures/Page.php.fixture', $projectPath . '/code/Page.php');
}