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:
Normann Lou 2010-09-06 06:24:05 +00:00
parent 3b5fe68774
commit 0b8e5d46fc
1 changed files with 8 additions and 0 deletions

View File

@ -6,9 +6,12 @@
class BlogHolderFunctionalTest extends FunctionalTest {
static $fixture_file = 'blog/tests/BlogHolderFunctionalTest.yml';
static $origlThemes;
function setUp() {
parent::setUp();
self::$origlThemes = SSViewer::current_theme();
SSViewer::set_theme(null);
$blogHolder = $this->objFromFixture('BlogHolder', 'blogholder');
$blogHolder->publish('Stage', 'Live');
@ -16,6 +19,11 @@ class BlogHolderFunctionalTest extends FunctionalTest {
$blogEntry->publish('Stage', 'Live');
}
function tearDown(){
SSViewer::set_theme(self::$origlThemes);
parent::tearDown();
}
function testFrontendBlogPostRequiresPermission() {
// get valid SecurityID (from comments form, would usually be copy/pasted)
$blogEntry = $this->objFromFixture('BlogEntry', 'entry1');