From 5f9cc21fd64f559d1985d1c15ad489f77f9ed021 Mon Sep 17 00:00:00 2001 From: Kienan Stewart Date: Sat, 28 Jul 2018 14:00:15 -0400 Subject: [PATCH] Fix m_actionTest::testPurge() --- bureau/class/m_action.php | 2 +- phpunit/tests/bureau/class/m_actionTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bureau/class/m_action.php b/bureau/class/m_action.php index 0c0aca29..27351686 100644 --- a/bureau/class/m_action.php +++ b/bureau/class/m_action.php @@ -241,7 +241,7 @@ class m_action { * @global m_messages $msg * @global m_mysql $db * @param type $all - * @return boolean + * @return boolean|int The number of rows purged; False is there was an error */ function purge($all = null) { global $msg, $db; diff --git a/phpunit/tests/bureau/class/m_actionTest.php b/phpunit/tests/bureau/class/m_actionTest.php index 72767e14..d429cb86 100644 --- a/phpunit/tests/bureau/class/m_actionTest.php +++ b/phpunit/tests/bureau/class/m_actionTest.php @@ -174,7 +174,7 @@ class m_actionTest extends AlterncTest { */ public function testPurge() { $result = $this->object->purge(); - $this->assertEquals(0, $result); + $this->assertEquals(1, $result); $expectedTable = $this->loadDataSet("actions-empty.yml")->getTable("actions"); $currentTable = $this->getConnection()->createQueryTable('actions', 'SELECT * FROM actions'); $this->assertTablesEqual($expectedTable, $currentTable);