Exemplo n.º 1
0
    /**
     * Tests whether the loading of transformation is working as expected.
     *
     * @return void
     */
    public function testLoadTransformations()
    {
        DocBlox_Core_Abstract::config()->transformations = array();
        $this->fixture = new DocBlox_Transformer();
        $this->assertEquals(0, count($this->fixture->getTransformations()), 'A transformer should not have transformations when initialized ' . 'with an empty configuration');
        DocBlox_Core_Abstract::config()->transformations = array(new Zend_Config_Xml(<<<XML
<?xml version="1.0"?>
<transformation>
  <query>test1</query>
  <writer>Xsl</writer>
  <source>test3</source>
  <artifact>test4</artifact>
</transformation>
XML
));
        $this->fixture->loadTransformations();
        $this->assertEquals(1, count($this->fixture->getTransformations()), 'When invoking the loadTransformations method with only a single ' . 'transformation in the configuration there should be only 1');
        // TODO: add test to check if a transformation which is passed as
        // argument is added correctly
        // TODO: add test to check if a template's transformations which is
        // passed as argument is added correctly
        $this->markTestIncomplete();
    }