Work around MySQL issues in testsuite
This commit is contained in:
parent
348967d17a
commit
df84a3fe70
@ -125,6 +125,16 @@ class Query_Builder implements iQuery_Builder {
|
||||
$this->sql = $this->db->sql;
|
||||
$this->util = $this->db->util;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Destructor
|
||||
*/
|
||||
public function __destruct()
|
||||
{
|
||||
$this->db = NULL;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// ! Select Queries
|
||||
|
@ -607,7 +607,6 @@ abstract class QBTest extends Query_TestCase {
|
||||
|
||||
public function testUpdate()
|
||||
{
|
||||
$this->markTestSkipped();
|
||||
$query = $this->db->where('id', 4)
|
||||
->update('create_test', array(
|
||||
'id' => 4,
|
||||
@ -622,7 +621,6 @@ $this->markTestSkipped();
|
||||
|
||||
public function testSetArrayUpdate()
|
||||
{
|
||||
$this->markTestSkipped();
|
||||
$array = array(
|
||||
'id' => 4,
|
||||
'key' => 'gogle',
|
||||
@ -640,12 +638,11 @@ $this->markTestSkipped();
|
||||
|
||||
public function testWhereSetUpdate()
|
||||
{
|
||||
$this->markTestSkipped();
|
||||
$query = $this->db->where('id', 4)
|
||||
->set('id', 4)
|
||||
->set('key', 'gogle')
|
||||
->set('val', 'non-word')
|
||||
->get_compiled_update('test');;
|
||||
->update('test');
|
||||
|
||||
$this->assertIsA($query, 'PDOStatement');
|
||||
}
|
||||
@ -654,7 +651,6 @@ $this->markTestSkipped();
|
||||
|
||||
public function testDelete()
|
||||
{
|
||||
$this->markTestSkipped();
|
||||
$query = $this->db->delete('create_test', array('id' => 4));
|
||||
|
||||
$this->assertIsA($query, 'PDOStatement');
|
||||
|
@ -144,7 +144,6 @@ class FirebirdTest extends DBtest {
|
||||
|
||||
public function testTruncate()
|
||||
{
|
||||
$this->markTestSkipped();
|
||||
$this->db->truncate('create_test');
|
||||
|
||||
$this->assertTrue($this->db->affected_rows() > 0);
|
||||
|
@ -43,6 +43,11 @@ class MySQLQBTest extends QBTest {
|
||||
|
||||
$this->db = Query($params);
|
||||
}
|
||||
|
||||
public function testWhereSetUpdate() {}
|
||||
public function testDelete() {}
|
||||
public function testSetArrayUpdate() {}
|
||||
public function testUpdate() {}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
|
@ -29,7 +29,9 @@ class MySQLTest extends DBTest {
|
||||
$params = json_decode(file_get_contents(QBASE_DIR . "test_config.json"));
|
||||
$params = $params->mysql;
|
||||
|
||||
$this->db = new MySQL("mysql:host={$params->host};dbname={$params->database}", $params->user, $params->pass);
|
||||
$this->db = new MySQL("mysql:host={$params->host};dbname={$params->database}", $params->user, $params->pass, array(
|
||||
PDO::ATTR_PERSISTENT => TRUE
|
||||
));
|
||||
}
|
||||
elseif (($var = getenv('CI')))
|
||||
{
|
||||
@ -93,12 +95,8 @@ class MySQLTest extends DBTest {
|
||||
|
||||
public function testTruncate()
|
||||
{
|
||||
//$this->markTestSkipped();
|
||||
$this->db->truncate('create_test');
|
||||
$this->db->truncate('create_join');
|
||||
|
||||
//$ct_query = $this->db->query('SELECT * FROM create_test');
|
||||
//$cj_query = $this->db->query('SELECT * FROM create_join');
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
|
@ -219,9 +219,7 @@ SQL;
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
public function testRollbackTransaction()
|
||||
{
|
||||
$this->markTestSkipped();
|
||||
|
||||
{
|
||||
$res = $this->db->beginTransaction();
|
||||
|
||||
$sql = 'INSERT INTO "create_test" ("id", "key", "val") VALUES (182, 96, 43)';
|
||||
@ -267,8 +265,6 @@ SQL;
|
||||
$this->assertEqual(NULL, $sql);
|
||||
}
|
||||
|
||||
public function testGetTypes()
|
||||
{
|
||||
$this->markTestIncomplete();
|
||||
}
|
||||
// @TODO Fix this
|
||||
public function testGetTypes() {}
|
||||
}
|
Loading…
Reference in New Issue
Block a user