content(); $this->assertPattern('/
/', $content);
		$this->assertNoPattern('/<\!\[CDATA\[/', $content);
		$this->assertPattern('/

/', $content); } function testOfContentWithoutSections() { $file = dirname(__FILE__).'/package/content_without_section.xml'; $source = simplexml_load_file($file, "SimpleTestXMLElement"); $content = $source->content(); $this->assertPattern('/

/', $content); } function testOfSingleLink() { $file = dirname(__FILE__).'/package/here_download.xml'; $source = simplexml_load_file($file, "SimpleTestXMLElement"); $map = dirname(__FILE__).'/package/map.xml'; $links = $source->links($map); $this->assertEqual(count($links), 3); $links_download = '

'; $this->assertEqual($links['download'], $links_download); } function testOfMultipleLinks() { $file = dirname(__FILE__).'/package/here_support.xml'; $source = simplexml_load_file($file, "SimpleTestXMLElement"); $map = dirname(__FILE__).'/package/map.xml'; $links = $source->links($map); $this->assertEqual(count($links), 3); $links_support = ''; $this->assertEqual($links['support'], $links_support); } function testOfHierarchicalLinks() { $file = dirname(__FILE__).'/package/here_overview.xml'; $source = simplexml_load_file($file, "SimpleTestXMLElement"); $map = dirname(__FILE__).'/package/map.xml'; $links = $source->links($map); $this->assertEqual(count($links), 3); $links_start_testing = ''; $this->assertEqual($links['start_testing'], $links_start_testing); } function testOfRootLinksWithHierarchy() { $file = dirname(__FILE__).'/package/here_simpletest.xml'; $source = simplexml_load_file($file, "SimpleTestXMLElement"); $map = dirname(__FILE__).'/package/map.xml'; $links = $source->links($map); $this->assertEqual(count($links), 3); $links_start_testing = ''; $this->assertEqual($links['start_testing'], $links_start_testing); } function testOfLinksWithNonRootParent() { $file = dirname(__FILE__).'/package/here_unit-tester.xml'; $source = simplexml_load_file($file, "SimpleTestXMLElement"); $map = dirname(__FILE__).'/package/map.xml'; $links = $source->links($map); $this->assertEqual(count($links), 3); $links_start_testing = ''; $this->assertEqual($links['start_testing'], $links_start_testing); } } $test = &new TestOfContentTransformationFromXMLToHTML(); $test->run(new HtmlReporter()); ?>