/** * Exposes the protected withStructure method. * * @param boolean $setting True to export the structure, false to not. * * @return void * * @since 12.1 */ public function withStructure($setting = true) { return parent::withStructure($setting); }
/** * Tests the withStructure method. */ public function testWithStructure() { $instance = new JDatabaseExporterPostgresql(); $result = $instance->withStructure(); $this->assertSame($instance, $result, 'withStructure must return an object to support chaining.'); $options = TestReflection::getValue($instance, 'options'); $this->assertTrue($options->withStructure, 'The default use of withStructure should result in true.'); $instance->withStructure(true); $options = TestReflection::getValue($instance, 'options'); $this->assertTrue($options->withStructure, 'The explicit use of withStructure with true should result in true.'); $instance->withStructure(false); $options = TestReflection::getValue($instance, 'options'); $this->assertFalse($options->withStructure, 'The explicit use of withStructure with false should result in false.'); }