aboutsummaryrefslogtreecommitdiff
path: root/tests/app/Models/UserQueryTest.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2023-01-28 13:37:09 +0100
committerGravatar GitHub <noreply@github.com> 2023-01-28 13:37:09 +0100
commite617830e966862006e7f64eb83a733deb4549e29 (patch)
tree9ee2ff908c9ae9cf2d766a774979e7ea787276f8 /tests/app/Models/UserQueryTest.php
parentd8744a9ec159a4b22274e18083004f060a2a1de9 (diff)
Fix types hint in UserQuery.php (#5045)
* Fix types hint in UserQuery.php In particular, we had a mix of strings and integers for the query state Pass PHPStan level 9 * Unneeded null check
Diffstat (limited to 'tests/app/Models/UserQueryTest.php')
-rw-r--r--tests/app/Models/UserQueryTest.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/app/Models/UserQueryTest.php b/tests/app/Models/UserQueryTest.php
index d56c4b743..7b1e88907 100644
--- a/tests/app/Models/UserQueryTest.php
+++ b/tests/app/Models/UserQueryTest.php
@@ -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);