Fix search using user queries (#5669)

fix https://github.com/FreshRSS/FreshRSS/issues/5668
This commit is contained in:
Alexandre Alapetite
2023-09-26 22:38:09 +02:00
committed by GitHub
parent 86d713478b
commit 89a3d36c3e
3 changed files with 9 additions and 21 deletions

View File

@@ -19,14 +19,6 @@ class UserQueryTest extends PHPUnit\Framework\TestCase {
self::assertEquals('favorite', $user_query->getGetType());
}
public function test__construct_whenCategoryQueryAndNoDao_throwsException(): void {
$this->expectException(FreshRSS_DAO_Exception::class);
$this->expectExceptionMessage('Category DAO is not loaded in UserQuery');
$query = array('get' => 'c_1');
new FreshRSS_UserQuery($query);
}
public function test__construct_whenCategoryQuery_storesCategoryParameters(): void {
$category_name = 'some category name';
/** @var FreshRSS_Category&PHPUnit\Framework\MockObject\MockObject */
@@ -47,14 +39,6 @@ class UserQueryTest extends PHPUnit\Framework\TestCase {
self::assertEquals('category', $user_query->getGetType());
}
public function test__construct_whenFeedQueryAndNoDao_throwsException(): void {
$this->expectException(FreshRSS_DAO_Exception::class);
$this->expectExceptionMessage('Feed DAO is not loaded in UserQuery');
$query = array('get' => 'f_1');
new FreshRSS_UserQuery($query);
}
public function test__construct_whenFeedQuery_storesFeedParameters(): void {
$feed_name = 'some feed name';
/** @var FreshRSS_Feed&PHPUnit\Framework\MockObject\MockObject */