/** * Tests the check method. * * @return void * @since 11.1 */ public function testCheckWithGoodInput() { $instance = new JDatabaseExporterMysqli(); $instance->setDbo($this->dbo); $instance->from('foobar'); try { $result = $instance->check(); $this->assertThat($result, $this->identicalTo($instance), 'check must return an object to support chaining.'); } catch (Exception $e) { $this->fail('Check method should not throw exception with good setup: ' . $e->getMessage()); } }
/** * Tests the from method with expected good inputs. */ public function testFromWithGoodInput() { $instance = new JDatabaseExporterMysqli(); $result = $instance->from('jos_foobar'); $this->assertSame($instance, $result, 'from must return an object to support chaining.'); $this->assertSame(array('jos_foobar'), TestReflection::getValue($instance, 'from'), 'The from method should convert a string input to an array.'); }
/** * Tests the from method with expected good inputs. * * @return void * * @since 11.1 */ public function testFromWithGoodInput() { $instance = new JDatabaseExporterMysqli(); 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()); } }