summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Alexis Degrugillier <github@ainw.org> 2015-03-05 06:45:00 -0500
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2015-03-05 13:29:41 +0100
commit96d5d9d034daadb2357f27b3763854b647f2086c (patch)
treee6866a0dfa500237d13a0fb0f2ab5cd1058c0908
parent5b90e1f4a0057aa78fd7d8d4d748b01676ec9073 (diff)
Fix DAO exception
Change the name and messages
-rw-r--r--app/Exceptions/DAOException.php2
-rw-r--r--app/Models/UserQuery.php8
-rw-r--r--tests/app/Models/UserQueryTest.php4
3 files changed, 7 insertions, 7 deletions
diff --git a/app/Exceptions/DAOException.php b/app/Exceptions/DAOException.php
index 6bd8f4ff0..e48e521ab 100644
--- a/app/Exceptions/DAOException.php
+++ b/app/Exceptions/DAOException.php
@@ -1,5 +1,5 @@
<?php
-class FreshRSS_DAOException extends \Exception {
+class FreshRSS_DAO_Exception extends \Exception {
}
diff --git a/app/Models/UserQuery.php b/app/Models/UserQuery.php
index 754b6996b..52747f538 100644
--- a/app/Models/UserQuery.php
+++ b/app/Models/UserQuery.php
@@ -104,11 +104,11 @@ class FreshRSS_UserQuery {
* Parse the query string when it is a "category" query
*
* @param integer $id
- * @throws FreshRSS_DAOException
+ * @throws FreshRSS_DAO_Exception
*/
private function parseCategory($id) {
if (is_null($this->category_dao)) {
- throw new FreshRSS_DAOException('Category DAO is not loaded i UserQuery');
+ throw new FreshRSS_DAO_Exception('Category DAO is not loaded in UserQuery');
}
$category = $this->category_dao->searchById($id);
if ($category) {
@@ -123,11 +123,11 @@ class FreshRSS_UserQuery {
* Parse the query string when it is a "feed" query
*
* @param integer $id
- * @throws FreshRSS_DAOException
+ * @throws FreshRSS_DAO_Exception
*/
private function parseFeed($id) {
if (is_null($this->feed_dao)) {
- throw new FreshRSS_DAOException('Feed DAO is not loaded i UserQuery');
+ throw new FreshRSS_DAO_Exception('Feed DAO is not loaded in UserQuery');
}
$feed = $this->feed_dao->searchById($id);
if ($feed) {
diff --git a/tests/app/Models/UserQueryTest.php b/tests/app/Models/UserQueryTest.php
index 2234be6e1..a0928d5ae 100644
--- a/tests/app/Models/UserQueryTest.php
+++ b/tests/app/Models/UserQueryTest.php
@@ -20,7 +20,7 @@ class UserQueryTest extends \PHPUnit_Framework_TestCase {
}
/**
- * @expectedException Exceptions/FreshRSS_DAOException
+ * @expectedException Exceptions/FreshRSS_DAO_Exception
* @expectedExceptionMessage Category DAO is not loaded in UserQuery
*/
public function test__construct_whenCategoryQueryAndNoDao_throwsException() {
@@ -48,7 +48,7 @@ class UserQueryTest extends \PHPUnit_Framework_TestCase {
}
/**
- * @expectedException Exceptions/FreshRSS_DAOException
+ * @expectedException Exceptions/FreshRSS_DAO_Exception
* @expectedExceptionMessage Feed DAO is not loaded in UserQuery
*/
public function test__construct_whenFeedQueryAndNoDao_throwsException() {