Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
Roeland Jago Douma 2017-05-02 11:38:21 +02:00
parent e79424932a
commit ae7c1504a9
No known key found for this signature in database
GPG Key ID: F941078878347C0C
1 changed files with 10 additions and 20 deletions

View File

@ -72,26 +72,16 @@ EOD;
}
public function testGetWithFilter() {
$this->config
->expects($this->at(0))
->method('getSystemValue')
->with('appstoreenabled', true)
->willReturn(true);
$this->config
->expects($this->at(1))
->method('getSystemValue')
->with('appstoreenabled', true)
->willReturn(true);
$this->config
->expects($this->at(2))
->method('getSystemValue')
->with('version')
->willReturn('11.0.0.2');
$this->config
->expects($this->at(3))
->method('getSystemValue')
->with('version')
->willReturn('11.0.0.2');
$this->config->method('getSystemValue')
->willReturnCallback(function($key, $default) {
if ($key === 'appstoreenabled') {
return true;
} else if ($key === 'version') {
return '11.0.0.2';
} else {
return $default;
}
});
$file = $this->createMock(ISimpleFile::class);
$folder = $this->createMock(ISimpleFolder::class);