summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/App/AppStore/Fetcher/CategoryFetcherTest.php5
-rw-r--r--tests/lib/App/AppStore/Fetcher/FetcherBase.php9
2 files changed, 11 insertions, 3 deletions
diff --git a/tests/lib/App/AppStore/Fetcher/CategoryFetcherTest.php b/tests/lib/App/AppStore/Fetcher/CategoryFetcherTest.php
index 874a58fc6ba..dbfca97f999 100644
--- a/tests/lib/App/AppStore/Fetcher/CategoryFetcherTest.php
+++ b/tests/lib/App/AppStore/Fetcher/CategoryFetcherTest.php
@@ -64,6 +64,11 @@ class CategoryFetcherTest extends FetcherBase {
}
return $default;
});
+ $this->config
+ ->method('getSystemValueString')
+ ->willReturnCallback(function ($var, $default) {
+ return $default;
+ });
$this->appData
->expects($this->never())
->method('getFolder');
diff --git a/tests/lib/App/AppStore/Fetcher/FetcherBase.php b/tests/lib/App/AppStore/Fetcher/FetcherBase.php
index dbc3f2a687c..7645cbef599 100644
--- a/tests/lib/App/AppStore/Fetcher/FetcherBase.php
+++ b/tests/lib/App/AppStore/Fetcher/FetcherBase.php
@@ -76,10 +76,13 @@ abstract class FetcherBase extends TestCase {
public function testGetWithAlreadyExistingFileAndUpToDateTimestampAndVersion() {
$this->config
- ->expects($this->exactly(1))
->method('getSystemValueString')
- ->with($this->equalTo('version'), $this->anything())
- ->willReturn('11.0.0.2');
+ ->willReturnCallback(function ($var, $default) {
+ if ($var === 'version') {
+ return '11.0.0.2';
+ }
+ return $default;
+ });
$this->config->method('getSystemValueBool')
->willReturnArgument(1);