formatOutput = true; $converter = new ezcDocumentDocbookToHtmlConverter( $options ); $this->assertSame( true, $converter->options->formatOutput ); } public function testNoSuchPropertyException() { $converter = new ezcDocumentDocbookToHtmlConverter(); try { $converter->notExistingOption; $this->fail( 'Expected ezcBasePropertyNotFoundException.' ); } catch ( ezcBasePropertyNotFoundException $e ) { /* Expected */ } } public function testSetOptionsProperty() { $converter = new ezcDocumentDocbookToHtmlConverter(); $options = new ezcDocumentDocbookToHtmlConverterOptions(); $options->formatOutput = true; $converter->options = $options; $this->assertSame( true, $converter->options->formatOutput ); try { $converter->options = 42; $this->fail( 'Expected ezcBaseValueException.' ); } catch ( ezcBaseValueException $e ) { /* Expected */ } } public function testSetNotExistingProperty() { $converter = new ezcDocumentDocbookToHtmlConverter(); try { $converter->notExistingOption = 42; $this->fail( 'Expected ezcBasePropertyNotFoundException.' ); } catch ( ezcBasePropertyNotFoundException $e ) { /* Expected */ } } public function testPropertyIsset() { $converter = new ezcDocumentDocbookToHtmlConverter(); $this->assertTrue( isset( $converter->options ) ); $this->assertFalse( isset( $converter->notExistingOption ) ); } } ?>