mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
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:
commit
9f01cce694
@ -1,20 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use SilverStripe\CMS\Model\SiteTree;
|
use SilverStripe\CMS\Model\SiteTree;
|
||||||
use SilverStripe\CMS\Controllers\ContentController;
|
|
||||||
|
|
||||||
class Page extends SiteTree
|
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
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
@ -8,7 +8,8 @@ if (defined('BASE_PATH')) {
|
|||||||
}
|
}
|
||||||
if (!is_dir($projectPath)) {
|
if (!is_dir($projectPath)) {
|
||||||
mkdir($projectPath, 02775);
|
mkdir($projectPath, 02775);
|
||||||
mkdir($projectPath.'/code', 02775);
|
mkdir($projectPath . '/code', 02775);
|
||||||
mkdir($projectPath.'/_config', 02775);
|
mkdir($projectPath . '/_config', 02775);
|
||||||
copy(__DIR__.'/fixtures/Page.php.fixture', $projectPath . '/code/Page.php');
|
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