Commit aa563f75 authored by Carsten  Rose's avatar Carsten Rose
Browse files

SaveTest.php: examine php unit problem on CI - added second test again, swapped update and insert.

parent 5122ffcc
......@@ -17,7 +17,7 @@ require_once(__DIR__ . '/AbstractDatabaseTest.php');
class SaveTest extends AbstractDatabaseTest {
public function testInsertRecord() {
public function testUpdateRecord() {
$save = new qfq\Save(array(), array(), array());
$db = new qfq\Database();
......@@ -25,17 +25,17 @@ class SaveTest extends AbstractDatabaseTest {
$values = ['name' => 'Doe', 'firstName' => 'John'];
$id = $save->insertRecord('Person', $values);
$sql = "SELECT name, firstName FROM Person WHERE id = ? ";
$values = ['name' => 'Doe', 'firstName' => 'Big John'];
$save->updateRecord('Person', $values, $id);
$sql = "SELECT name, firstName FROM Person WHERE id = ? ";
$result = $db->sql($sql, ROW_REGULAR, [$id]);
$this->assertEquals($values, $result[0]);
}
public function testUpdateRecord() {
return;
public function testInsertRecord() {
$save = new qfq\Save(array(), array(), array());
$db = new qfq\Database();
......@@ -43,10 +43,8 @@ class SaveTest extends AbstractDatabaseTest {
$values = ['name' => 'Doe', 'firstName' => 'John'];
$id = $save->insertRecord('Person', $values);
$values = ['name' => 'Doe', 'firstName' => 'Big John'];
$save->updateRecord('Person', $values, $id);
$sql = "SELECT name, firstName FROM Person WHERE id = ? ";
$result = $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