From 21f96308c4966b468eba4e75dabe49977d52be3f Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 10 Mar 2022 16:16:30 +0100 Subject: [PATCH] Overwrite the channel Signed-off-by: Joas Schilling --- .../App/AppStore/Fetcher/AppFetcherTest.php | 24 ++++++++++++------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/tests/lib/App/AppStore/Fetcher/AppFetcherTest.php b/tests/lib/App/AppStore/Fetcher/AppFetcherTest.php index 14a7569a64e..4746c296ab4 100644 --- a/tests/lib/App/AppStore/Fetcher/AppFetcherTest.php +++ b/tests/lib/App/AppStore/Fetcher/AppFetcherTest.php @@ -1854,15 +1854,21 @@ EJL3BaQAQaASSsvFrcozYxrQG4VzEg== $this->logger = $this->createMock(LoggerInterface::class); $this->registry = $this->createMock(IRegistry::class); - $this->fetcher = new AppFetcher( - $factory, - $this->clientService, - $this->timeFactory, - $this->config, - $this->compareVersion, - $this->logger, - $this->registry - ); + $this->fetcher = $this->getMockBuilder(AppFetcher::class) + ->setMethods(['getChannel']) + ->setConstructorArgs([ + $factory, + $this->clientService, + $this->timeFactory, + $this->config, + $this->compareVersion, + $this->logger, + $this->registry, + ]) + ->getMock(); + + $this->fetcher->method('getChannel') + ->willReturn('stable'); } public function testGetWithFilter() {