/** * Tests the from method with expected good inputs. */ public function testFromWithGoodInput() { $instance = new JDatabaseExporterPostgresql(); $result = $instance->from('jos_foobar'); $this->assertSame($instance, $result, 'from must return an object to support chaining.'); $this->assertAttributeEquals(array('jos_foobar'), 'from', $instance, 'The from method should convert a string input to an array.'); }
/** * Tests the from method with expected good inputs. * * @return void * * @since 12.1 */ public function testFromWithGoodInput() { $instance = new JDatabaseExporterPostgresql(); try { $result = $instance->from('jos_foobar'); $this->assertThat($result, $this->identicalTo($instance), 'from must return an object to support chaining.'); $this->assertThat(TestReflection::getValue($instance, 'from'), $this->equalTo(array('jos_foobar')), 'The from method should convert a string input to an array.'); } catch (Exception $e) { $this->fail('From method should not throw exception with good input: ' . $e->getMessage()); } }