FIX Fixture the 'app' dir instead of mysite in unit tests

This commit is contained in:
Robbie Averill 2018-04-11 19:03:09 +12:00
parent c4f8af543c
commit 5da708d223
3 changed files with 5 additions and 5 deletions

View File

@ -3,4 +3,4 @@
require __DIR__ . '/../bootstrap/init.php'; require __DIR__ . '/../bootstrap/init.php';
require FRAMEWORK_PATH . '/tests/bootstrap/init.php'; require FRAMEWORK_PATH . '/tests/bootstrap/init.php';
require FRAMEWORK_PATH . '/tests/bootstrap/environment.php'; require FRAMEWORK_PATH . '/tests/bootstrap/environment.php';
require __DIR__ . '/../bootstrap/mysite.php'; require __DIR__ . '/../bootstrap/app.php';

View File

@ -4,4 +4,4 @@ require __DIR__ . '/bootstrap/init.php';
require FRAMEWORK_PATH . '/tests/bootstrap/init.php'; require FRAMEWORK_PATH . '/tests/bootstrap/init.php';
require FRAMEWORK_PATH . '/tests/bootstrap/cli.php'; require FRAMEWORK_PATH . '/tests/bootstrap/cli.php';
require FRAMEWORK_PATH . '/tests/bootstrap/environment.php'; require FRAMEWORK_PATH . '/tests/bootstrap/environment.php';
require __DIR__ . '/bootstrap/mysite.php'; require __DIR__ . '/bootstrap/app.php';

View File

@ -1,10 +1,10 @@
<?php <?php
// Mock mysite if not installed with silverstripe/installer // Mock app if not installed with silverstripe/installer
if (defined('BASE_PATH')) { if (defined('BASE_PATH')) {
$projectPath = BASE_PATH . '/mysite'; $projectPath = BASE_PATH . '/app';
} else { } else {
$projectPath = getcwd() . '/mysite'; $projectPath = getcwd() . '/app';
} }
if (!is_dir($projectPath)) { if (!is_dir($projectPath)) {
mkdir($projectPath, 02775); mkdir($projectPath, 02775);