mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
BUGFIX: the unit test for BlogHolderFunctionalTest fail when a customized project has its own themes and the BlogHolder template has no blog entry form or the page has no PageComments section. So it needs to set the unit test session not use themes.
This commit is contained in:
parent
3b5fe68774
commit
0b8e5d46fc
@ -6,9 +6,12 @@
|
|||||||
class BlogHolderFunctionalTest extends FunctionalTest {
|
class BlogHolderFunctionalTest extends FunctionalTest {
|
||||||
|
|
||||||
static $fixture_file = 'blog/tests/BlogHolderFunctionalTest.yml';
|
static $fixture_file = 'blog/tests/BlogHolderFunctionalTest.yml';
|
||||||
|
static $origlThemes;
|
||||||
|
|
||||||
function setUp() {
|
function setUp() {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
self::$origlThemes = SSViewer::current_theme();
|
||||||
|
SSViewer::set_theme(null);
|
||||||
|
|
||||||
$blogHolder = $this->objFromFixture('BlogHolder', 'blogholder');
|
$blogHolder = $this->objFromFixture('BlogHolder', 'blogholder');
|
||||||
$blogHolder->publish('Stage', 'Live');
|
$blogHolder->publish('Stage', 'Live');
|
||||||
@ -16,6 +19,11 @@ class BlogHolderFunctionalTest extends FunctionalTest {
|
|||||||
$blogEntry->publish('Stage', 'Live');
|
$blogEntry->publish('Stage', 'Live');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function tearDown(){
|
||||||
|
SSViewer::set_theme(self::$origlThemes);
|
||||||
|
parent::tearDown();
|
||||||
|
}
|
||||||
|
|
||||||
function testFrontendBlogPostRequiresPermission() {
|
function testFrontendBlogPostRequiresPermission() {
|
||||||
// get valid SecurityID (from comments form, would usually be copy/pasted)
|
// get valid SecurityID (from comments form, would usually be copy/pasted)
|
||||||
$blogEntry = $this->objFromFixture('BlogEntry', 'entry1');
|
$blogEntry = $this->objFromFixture('BlogEntry', 'entry1');
|
||||||
|
Loading…
Reference in New Issue
Block a user