aboutsummaryrefslogtreecommitdiff
path: root/tests/app/Models/UserQueryTest.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2023-03-04 13:30:45 +0100
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2023-03-04 13:30:45 +0100
commitb3239256dc6d188cda970adab516b3fcf1b86129 (patch)
treed8e65dd9784834ba2e82ce7ee94b4718f8af19ea /tests/app/Models/UserQueryTest.php
parent27b71ffa99f7dff013fb8d51d020ed628e0d2ce6 (diff)
parent0fe0ce894cbad09757d719dd4b400b9862c1a12a (diff)
Merge branch 'edge' into latest
Diffstat (limited to 'tests/app/Models/UserQueryTest.php')
-rw-r--r--tests/app/Models/UserQueryTest.php20
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/app/Models/UserQueryTest.php b/tests/app/Models/UserQueryTest.php
index c876740e6..7b1e88907 100644
--- a/tests/app/Models/UserQueryTest.php
+++ b/tests/app/Models/UserQueryTest.php
@@ -34,7 +34,7 @@ class UserQueryTest extends PHPUnit\Framework\TestCase {
->method('name')
->withAnyParameters()
->willReturn($category_name);
- $cat_dao = $this->createMock('FreshRSS_Searchable');
+ $cat_dao = $this->createMock('FreshRSS_CategoryDAO');
$cat_dao->expects($this->atLeastOnce())
->method('searchById')
->withAnyParameters()
@@ -60,7 +60,7 @@ class UserQueryTest extends PHPUnit\Framework\TestCase {
->method('name')
->withAnyParameters()
->willReturn($feed_name);
- $feed_dao = $this->createMock('FreshRSS_Searchable');
+ $feed_dao = $this->createMock('FreshRSS_FeedDAO');
$feed_dao->expects($this->atLeastOnce())
->method('searchById')
->withAnyParameters()
@@ -74,8 +74,8 @@ class UserQueryTest extends PHPUnit\Framework\TestCase {
public function test__construct_whenUnknownQuery_doesStoreParameters() {
$query = array('get' => 'q');
$user_query = new FreshRSS_UserQuery($query);
- $this->assertNull($user_query->getGetName());
- $this->assertNull($user_query->getGetType());
+ $this->assertEmpty($user_query->getGetName());
+ $this->assertEmpty($user_query->getGetType());
}
public function test__construct_whenName_storesName() {
@@ -93,7 +93,7 @@ class UserQueryTest extends PHPUnit\Framework\TestCase {
}
public function test__construct_whenState_storesState() {
- $state = 'some state';
+ $state = FreshRSS_Entry::STATE_ALL;
$query = array('state' => $state);
$user_query = new FreshRSS_UserQuery($query);
$this->assertEquals($state, $user_query->getState());
@@ -118,7 +118,7 @@ class UserQueryTest extends PHPUnit\Framework\TestCase {
'name' => 'some name',
'order' => 'some order',
'search' => 'some search',
- 'state' => 'some state',
+ 'state' => FreshRSS_Entry::STATE_ALL,
'url' => 'some url',
);
$user_query = new FreshRSS_UserQuery($query);
@@ -160,7 +160,7 @@ class UserQueryTest extends PHPUnit\Framework\TestCase {
public function testIsDeprecated_whenCategoryExists_returnFalse() {
$cat = $this->createMock('FreshRSS_Category');
- $cat_dao = $this->createMock('FreshRSS_Searchable');
+ $cat_dao = $this->createMock('FreshRSS_CategoryDAO');
$cat_dao->expects($this->atLeastOnce())
->method('searchById')
->withAnyParameters()
@@ -171,7 +171,7 @@ class UserQueryTest extends PHPUnit\Framework\TestCase {
}
public function testIsDeprecated_whenCategoryDoesNotExist_returnTrue() {
- $cat_dao = $this->createMock('FreshRSS_Searchable');
+ $cat_dao = $this->createMock('FreshRSS_CategoryDAO');
$cat_dao->expects($this->atLeastOnce())
->method('searchById')
->withAnyParameters()
@@ -183,7 +183,7 @@ class UserQueryTest extends PHPUnit\Framework\TestCase {
public function testIsDeprecated_whenFeedExists_returnFalse() {
$feed = $this->createMock('FreshRSS_Feed', array(), array('', false));
- $feed_dao = $this->createMock('FreshRSS_Searchable');
+ $feed_dao = $this->createMock('FreshRSS_FeedDAO');
$feed_dao->expects($this->atLeastOnce())
->method('searchById')
->withAnyParameters()
@@ -194,7 +194,7 @@ class UserQueryTest extends PHPUnit\Framework\TestCase {
}
public function testIsDeprecated_whenFeedDoesNotExist_returnTrue() {
- $feed_dao = $this->createMock('FreshRSS_Searchable');
+ $feed_dao = $this->createMock('FreshRSS_FeedDAO');
$feed_dao->expects($this->atLeastOnce())
->method('searchById')
->withAnyParameters()