]> source.dussan.org Git - nextcloud-server.git/commitdiff
Overwrite the channel 31511/head
authorJoas Schilling <coding@schilljs.com>
Thu, 10 Mar 2022 15:16:30 +0000 (16:16 +0100)
committerJoas Schilling <coding@schilljs.com>
Thu, 10 Mar 2022 15:16:30 +0000 (16:16 +0100)
Signed-off-by: Joas Schilling <coding@schilljs.com>
tests/lib/App/AppStore/Fetcher/AppFetcherTest.php

index 14a7569a64e27b85e4c34a38231458992b9db3fb..4746c296ab4fe7c0ad146633dd0e6f770d604c5c 100644 (file)
@@ -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() {