function testQuery() { if (!$this->methodExists($this->db, 'query')) { return; } $result = $this->standardQuery(); $this->assertTrue(MDB2::isResult($result), 'query: $result returned is not a resource'); $this->assertTrue(MDB2::isResultCommon($result), 'query: $result returned is not a resource'); }
/** * Tests that the MDB2::isResult() method correctly identifies * results. */ function test_isResult() { $obj = new MDB2_Result(); $this->assertTrue(MDB2::isResult($obj), 'isResult'); $obj = null; $this->assertFalse(MDB2::isResult($obj), 'isResult'); }
/** * Tests that the MDB2::isResult() method correctly identifies * results. * @dataProvider provider */ public function test_isResult($ci) { $this->manualSetUp($ci); $obj = new MDB2_Result(); $this->assertTrue(MDB2::isResult($obj), 'isResult'); $obj = null; $this->assertFalse(MDB2::isResult($obj), 'isResult'); }