FIX Separate PageController fixture into its own file (PSR-2 compat)

This commit is contained in:
Robbie Averill 2017-01-12 10:05:05 +13:00
parent 05b5e545e0
commit 773c848c0f
3 changed files with 15 additions and 18 deletions

View File

@ -1,20 +1,8 @@
<?php
use SilverStripe\CMS\Model\SiteTree;
use SilverStripe\CMS\Controllers\ContentController;
class Page extends SiteTree
{
}
class PageController extends ContentController
{
}
/**
* Deprecated: Used for backwards compatibility between modules
*/
class Page_Controller extends ContentController
{
}

View File

@ -0,0 +1,8 @@
<?php
use SilverStripe\CMS\Controllers\ContentController;
class PageController extends ContentController
{
}

View File

@ -2,13 +2,14 @@
// Mock mysite if not installed with silverstripe/installer
if (defined('BASE_PATH')) {
$projectPath = BASE_PATH . '/mysite';
$projectPath = BASE_PATH . '/mysite';
} else {
$projectPath = getcwd() . '/mysite';
$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');
mkdir($projectPath, 02775);
mkdir($projectPath . '/code', 02775);
mkdir($projectPath . '/_config', 02775);
copy(__DIR__ . '/fixtures/Page.php.fixture', $projectPath . '/code/Page.php');
copy(__DIR__ . '/fixtures/PageController.php.fixture', $projectPath . '/code/PageController.php');
}