assertTrue( $doc->validateFile( $file ) ); } public function testValidateErrorneousDocbook() { $doc = new ezcDocumentDocbook(); $this->assertTrue( is_array( $errors = $doc->validateFile( dirname( __FILE__ ) . '/files/docbook/errorneous.xml' ) ) ); $this->assertSame( 'Fatal error in 7:13: Opening and ending tag mismatch: section line 4 and Section.', (string) $errors[0] ); } public function testValidateInvalidDocbook() { $doc = new ezcDocumentDocbook(); $this->assertTrue( is_array( $errors = $doc->validateFile( dirname( __FILE__ ) . '/files/docbook/invalid.xml' ) ) ); $this->assertSame( 'Error in 4:0: Element \'{http://docbook.org/ns/docbook}section\', attribute \'id\': The attribute \'id\' is not allowed..', (string) $errors[0] ); } } ?>