Changeset 1502

Show
Ignore:
Timestamp:
04/06/08 01:40:20 (1 month ago)
Author:
mikey
Message:

added unit test for net::stubbles::websites::memphis::stubMemphisIncludeTemplatePageElement

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/main/php/net/stubbles/websites/memphis/stubMemphisIncludeTemplatePageElement.php

    r1362 r1502  
    2424     * @var  string 
    2525     */ 
    26     protected $source = ''
     26    protected $source = null
    2727    /** 
    2828     * base directory where content is located 
     
    7474    public function getCacheVars() 
    7575    { 
     76        if (null === $this->source) { 
     77            return array(); 
     78        } 
     79         
    7680        return array('source' => $this->source); 
    7781    } 
     
    8488    public function getUsedFiles() 
    8589    { 
     90        if (null === $this->source) { 
     91            return array(); 
     92        } 
     93         
    8694        return array(self::$tmplPath . DIRECTORY_SEPARATOR . $this->source); 
    8795    } 
     
    99107        } 
    100108         
    101         $this->context['template']->readTemplatesFromFile($this->source); 
     109        if (null === $this->source) { 
     110            return ''; 
     111        } 
     112         
     113        $this->context['template']->readTemplatesFromInput($this->source); 
    102114        return $this->context['template']->getParsedTemplate($this->name); 
    103115    } 
  • trunk/src/test/php/net/stubbles/websites/WebsitesTestSuite.php

    r1462 r1502  
    4040        // memphis 
    4141        $suite->addTestFile($dir . '/memphis/stubMemphisIncludeFilePageElementTestCase.php'); 
     42        $suite->addTestFile($dir . '/memphis/stubMemphisIncludeTemplatePageElementTestCase.php'); 
    4243        $suite->addTestFile($dir . '/memphis/stubMemphisPageElementTestCase.php'); 
    4344        $suite->addTestFile($dir . '/memphis/stubMemphisProcessorCachableTestCase.php');