markTestSkipped( 'You need XSLT support disabled for this test.' ); } try { $converter = new ezcDocumentEzp3ToEzp4Converter(); $this->fail( 'Expected ezcBaseExtensionNotFoundException.' ); } catch ( ezcBaseExtensionNotFoundException $e ) { /* Expected */ } } /** * @TODO: We should test this in more fine steps, then just testing one * single big document. * * @dataProvider getTestDocuments */ public function testLoadXmlDocumentFromFile( $from, $to ) { if ( !ezcBaseFeatures::hasExtensionSupport( 'xsl' ) ) { $this->markTestSkipped( 'You need XSLT support for this test.' ); } $doc = new ezcDocumentEzp3Xml(); $doc->loadFile( $from ); $converter = new ezcDocumentEzp3ToEzp4Converter(); $converter->options->customInlineTags = array( 'sub' ); $created = $converter->convert( $doc ); $this->assertTrue( $created instanceof ezcDocumentEzp4Xml ); $dest = new DOMDocument(); $dest->load( $to ); $this->assertEquals( $dest, $created->getDomDocument() ); } } ?>