Skip to content

Commit 2cffff2

Browse files
committed
Utilize new count data on update in tests
1 parent 2c0761b commit 2cffff2

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,10 @@ function createTable ($name, $data) {
125125

126126
$db->where ("active", false);
127127
$db->update("users", Array ("active" => $db->not()));
128+
if ($db->count != 2) {
129+
echo "Invalid update count with not()";
130+
exit;
131+
}
128132

129133
$db->where ("active", true);
130134
$users = $db->get("users");
@@ -160,6 +164,11 @@ function createTable ($name, $data) {
160164
);
161165
$db->where ("id", 1);
162166
$cnt = $db->update("users", $upData);
167+
if ($db->count != 1) {
168+
echo "Invalid update count with functions";
169+
exit;
170+
}
171+
163172

164173
$db->where ("id", 1);
165174
$r = $db->getOne("users");

0 commit comments

Comments
 (0)