Commit 5cbaaf2a authored by Carsten  Rose's avatar Carsten Rose
Browse files

SaveTest.php: examine php unit problem on CI - reswapped update & insert...

SaveTest.php: examine php unit problem on CI - reswapped update & insert again. Use global $db instead of local.
parent aa563f75
......@@ -20,7 +20,7 @@ class SaveTest extends AbstractDatabaseTest {
public function testUpdateRecord() {
$save = new qfq\Save(array(), array(), array());
$db = new qfq\Database();
// $db = new qfq\Database();
$values = ['name' => 'Doe', 'firstName' => 'John'];
$id = $save->insertRecord('Person', $values);
......@@ -29,7 +29,7 @@ class SaveTest extends AbstractDatabaseTest {
$save->updateRecord('Person', $values, $id);
$sql = "SELECT name, firstName FROM Person WHERE id = ? ";
$result = $db->sql($sql, ROW_REGULAR, [$id]);
$result = $this->db->sql($sql, ROW_REGULAR, [$id]);
$this->assertEquals($values, $result[0]);
......@@ -38,14 +38,14 @@ class SaveTest extends AbstractDatabaseTest {
public function testInsertRecord() {
$save = new qfq\Save(array(), array(), array());
$db = new qfq\Database();
// $db = new qfq\Database();
$values = ['name' => 'Doe', 'firstName' => 'John'];
$id = $save->insertRecord('Person', $values);
$sql = "SELECT name, firstName FROM Person WHERE id = ? ";
$result = $db->sql($sql, ROW_REGULAR, [$id]);
$result = $this->db->sql($sql, ROW_REGULAR, [$id]);
$this->assertEquals($values, $result[0]);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment