markTestSkipped( "Comparision file '$to' not yet defined." ); } $document = new ezcDocumentBBCode(); $document->options->errorReporting = E_PARSE | E_ERROR | E_WARNING; /* $document->registerPlugin( 'currenttimeplugin', 'ezcDocumentTestDummyPlugin' ); $document->registerPlugin( 'calendar', 'ezcDocumentTestDummyPlugin' ); $document->registerPlugin( 'html', 'ezcDocumentTestDummyPlugin' ); $document->registerPlugin( 'php', 'ezcDocumentTestDummyPlugin' ); */ $document->loadFile( $from ); $docbook = $document->getAsDocbook(); $xml = $docbook->save(); // Store test file, to have something to compare on failure $tempDir = $this->createTempDir( 'bbcode_visitor_' ) . '/'; file_put_contents( $tempDir . basename( $to ), $xml ); // Validate generated docbook $this->assertTrue( $docbook->validateString( $xml ) ); $this->assertEquals( file_get_contents( $to ), $xml, 'Document not visited as expected.' ); // Remove tempdir, when nothing failed. $this->removeTempDir(); } } ?>