public function testThemeRendering()
 {
     $template = new Template('test', 'html');
     $block = new Block('overridden.inc');
     $expectedOutput = file_get_contents(SITE_HOME . '/Themes/' . THEME . '/blocks/html/overridden.inc');
     $this->assertEquals($expectedOutput, $block->render('html', $template));
 }
示例#2
0
 /**
  * SITE_HOME should be able to override any block
  */
 public function testSiteOverrides()
 {
     $template = new Template('test', 'test');
     $block = new Block('test.inc');
     $expectedOutput = file_get_contents(__DIR__ . '/blocks/test/test.inc');
     $this->assertEquals($expectedOutput, $block->render('test', $template));
     $block = new Block('includes.inc');
     $this->assertEquals($expectedOutput, $block->render('test', $template));
 }
 public function testBlossomRendering()
 {
     $block = new Block('about.txt');
     $expectedOutput = file_get_contents(BLOSSOM . '/blocks/html/about.txt');
     $this->assertEquals($expectedOutput, $block->render('html', $this->template));
 }
<?php

/**
 * @copyright 2007-2013 City of Bloomington, Indiana
 * @license http://www.gnu.org/licenses/agpl.txt GNU/AGPL, see LICENSE.txt
 * @author Cliff Ingham <*****@*****.**>
 */
use Blossom\Classes\Block;
if (isset($_SESSION['errorMessages'])) {
    $errorBlock = new Block('errorMessages.inc', array('errorMessages' => $_SESSION['errorMessages']));
    echo $errorBlock->render($this->outputFormat);
    unset($_SESSION['errorMessages']);
}