mirror of
https://github.com/e107inc/e107.git
synced 2025-07-13 11:06:20 +02:00
Improved determinism of cloned testDb_Select_gen() tests
If either e_db_mysqlTest's or e_db_pdoTest's testDb_Select_gen() method gets called before the other, the second won't update and will return 0 instead of the expected 1. The UPDATE query is unique for each test now so that this cannot happen anymore.
This commit is contained in:
@ -303,7 +303,9 @@
|
|||||||
|
|
||||||
public function testDb_Select_gen()
|
public function testDb_Select_gen()
|
||||||
{
|
{
|
||||||
$result = $this->db->db_Select_gen("UPDATE `#user` SET user_ip = '127.0.0.3' WHERE user_id = 1");
|
$result = $this->db->db_Select_gen(
|
||||||
|
"UPDATE `#user` SET user_signature = 'e_db_mysql' WHERE user_id = 1"
|
||||||
|
);
|
||||||
$this->assertEquals(1,$result);
|
$this->assertEquals(1,$result);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -330,7 +330,9 @@
|
|||||||
|
|
||||||
public function testDb_Select_gen()
|
public function testDb_Select_gen()
|
||||||
{
|
{
|
||||||
$result = $this->db->db_Select_gen("UPDATE `#user` SET user_ip = '127.0.0.3' WHERE user_id = 1");
|
$result = $this->db->db_Select_gen(
|
||||||
|
"UPDATE `#user` SET user_signature = 'e_db_pdo' WHERE user_id = 1"
|
||||||
|
);
|
||||||
$this->assertEquals(1,$result);
|
$this->assertEquals(1,$result);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user