mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
FIX Separate PageController fixture into its own file (PSR-2 compat)
This commit is contained in:
parent
05b5e545e0
commit
773c848c0f
@ -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
|
||||
{
|
||||
|
||||
}
|
||||
|
8
tests/bootstrap/fixtures/PageController.php.fixture
Normal file
8
tests/bootstrap/fixtures/PageController.php.fixture
Normal file
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
use SilverStripe\CMS\Controllers\ContentController;
|
||||
|
||||
class PageController extends ContentController
|
||||
{
|
||||
|
||||
}
|
@ -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');
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user