aboutsummaryrefslogtreecommitdiff
path: root/tests/app/Models/CategoryTest.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2024-12-28 23:58:00 +0100
committerGravatar GitHub <noreply@github.com> 2024-12-28 23:58:00 +0100
commitc29cbb7b8be95fee249ed1a21dce98a4772d92e2 (patch)
treeb116f6033ea081c6cc5f82ce83156f2a7021166c /tests/app/Models/CategoryTest.php
parent33cdfbb309c61167cf1c81273eb242f94ca8f996 (diff)
Fix regressions on some array structures (#7155)
regressions from https://github.com/FreshRSS/FreshRSS/pull/7131 fix https://github.com/FreshRSS/FreshRSS/issues/7154
Diffstat (limited to 'tests/app/Models/CategoryTest.php')
-rw-r--r--tests/app/Models/CategoryTest.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/app/Models/CategoryTest.php b/tests/app/Models/CategoryTest.php
index 70bed7477..0290b6b61 100644
--- a/tests/app/Models/CategoryTest.php
+++ b/tests/app/Models/CategoryTest.php
@@ -33,6 +33,7 @@ class CategoryTest extends PHPUnit\Framework\TestCase {
$feed_1 = $this->getMockBuilder(FreshRSS_Feed::class)
->disableOriginalConstructor()
->getMock();
+ $feed_1->method('id')->withAnyParameters()->willReturn(1);
$feed_1->expects(self::any())
->method('name')
->willReturn('AAA');
@@ -40,6 +41,7 @@ class CategoryTest extends PHPUnit\Framework\TestCase {
$feed_2 = $this->getMockBuilder(FreshRSS_Feed::class)
->disableOriginalConstructor()
->getMock();
+ $feed_2->method('id')->withAnyParameters()->willReturn(2);
$feed_2->expects(self::any())
->method('name')
->willReturn('ZZZ');
@@ -47,6 +49,7 @@ class CategoryTest extends PHPUnit\Framework\TestCase {
$feed_3 = $this->getMockBuilder(FreshRSS_Feed::class)
->disableOriginalConstructor()
->getMock();
+ $feed_3->method('id')->withAnyParameters()->willReturn(3);
$feed_3->expects(self::any())
->method('name')
->willReturn('lll');
@@ -70,9 +73,11 @@ class CategoryTest extends PHPUnit\Framework\TestCase {
$feed_4 = $this->getMockBuilder(FreshRSS_Feed::class)
->disableOriginalConstructor()
->getMock();
+ $feed_4->method('id')->withAnyParameters()->willReturn(4);
$feed_4->expects(self::any())
->method('name')
->willReturn('BBB');
+ $feed_4->method('id')->withAnyParameters()->willReturn(5);
$category->addFeed($feed_4);
$feeds = $category->feeds();