Changeset 1450

Show
Ignore:
Timestamp:
03/23/08 00:12:27 (8 months ago)
Author:
mikey
Message:

added unit test for net::stubbles::websites::xml::page::stubXMLPassThruPageElement

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/main/php/net/stubbles/websites/xml/page/stubXMLPassThruPageElement.php

    r1421 r1450  
    1515 * @package     stubbles 
    1616 * @subpackage  websites_xml_page 
    17  * @XMLTag(tagName="passThru"
    18  * @XMLMethods[XMLMatcher](pattern="/getContents/"
     17 * @XMLTag(tagName='passThru'
     18 * @XMLMethods[XMLMatcher](pattern='/getContents/'
    1919 */ 
    2020class stubXMLPassThruPageElement extends stubAbstractPageElement implements stubXMLPageElement 
     
    5757     * 
    5858     * @return  string 
    59      * @XMLFragment(tagName="content"
     59     * @XMLFragment(tagName='content'
    6060     */ 
    6161    public function getContents() 
    6262    { 
    63         $fileName = $this->directory . DIRECTORY_SEPARATOR . $this->fileName; 
     63        $fileName = $this->directory . '/' . $this->fileName; 
    6464        if (file_exists($fileName) == false) { 
    6565            return '<error>The file ' . $fileName . ' does not exist.</error>'; 
     
    7676    public function getCacheVars() 
    7777    { 
    78         return array('filename' => $this->fileName); 
     78        return array('filename' => $this->directory . '/' . $this->fileName); 
    7979    } 
    8080 
     
    8686    public function getUsedFiles() 
    8787    { 
    88         return array($this->directory . DIRECTORY_SEPARATOR . $this->fileName); 
     88        return array($this->directory . '/' . $this->fileName); 
    8989    } 
    9090 
  • trunk/src/test/php/net/stubbles/websites/WebsitesTestSuite.php

    r1449 r1450  
    5858        // xml page 
    5959        $suite->addTestFile($dir . '/xml/page/stubXMLPageElementDecoratorTestCase.php'); 
     60        $suite->addTestFile($dir . '/xml/page/stubXMLPassThruPageElementTestCase.php'); 
    6061 
    6162        // xml skin