summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruckelman <uckelman@nomic.net>2010-04-11 20:26:11 +0000
committeruckelman <uckelman@nomic.net>2010-04-11 20:26:11 +0000
commit9669f8c5c994b9c7c5d960e5d920e97962f80322 (patch)
tree211bd2e5992774c938043b0f3c8f4ecf2bf3dde0
parent892aab166e5060e3c28c26953a62bc4632f3709b (diff)
Updated test.
git-svn-id: https://vassalengine.svn.sourceforge.net/svnroot/vassalengine/site-src/trunk@6680 67b53d14-2c14-4ace-a08f-0dab2b34000c
-rw-r--r--src/Bridge.php7
-rw-r--r--test/BridgeTest.php2
2 files changed, 5 insertions, 4 deletions
diff --git a/src/Bridge.php b/src/Bridge.php
index e46013d..3884154 100644
--- a/src/Bridge.php
+++ b/src/Bridge.php
@@ -68,7 +68,6 @@ class Bridge {
. $this->quote($references) . ')';
$count = $this->db->exec($sql);
-
return $count == 1;
}
@@ -78,9 +77,11 @@ class Bridge {
$sql = 'DELETE FROM posts WHERE message_id = ' .
$this->db->quote($messageId);
- $coult = $this->db->exec($sql);
+ $count = $this->db->exec($sql);
- return $count == 1;
+ if ($count != 1) {
+ throw new Exception('Failed to delete message id: ' . $messageId);
+ }
}
protected function get_exactly_one_row($sql) {
diff --git a/test/BridgeTest.php b/test/BridgeTest.php
index cc094e6..386e2b2 100644
--- a/test/BridgeTest.php
+++ b/test/BridgeTest.php
@@ -141,7 +141,7 @@ class BridgeTest extends PHPUnit_Framework_TestCase {
return array(
array(null, null, 'Exception'),
array('<20100302094228.33F0310091@charybdis.ellipsis.cx>', true, null),
- array('<10100302094228.33F0310091@charybdis.ellipsis.cx>', false, null)
+ array('<10100302094228.33F0310091@charybdis.ellipsis.cx>', null, 'Exception')
);
}