Merge pull request #1712 from robbieaverill/bugfix/update-page-fixture-for-psr-2

FIX Separate PageController fixture into its own file (PSR-2 compat)
This commit is contained in:
Ingo Schommer 2017-01-12 11:34:18 +13:00 committed by GitHub
commit 9f01cce694
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');
}