Fix unit tests to pass the folder now via the appData dependency

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
pull/10377/head
Morris Jobke 2018-07-25 16:57:36 +07:00
parent 6686ca9b2a
commit 801e5a4523
No known key found for this signature in database
GPG Key ID: FE03C3A163FEDE68
1 changed files with 8 additions and 2 deletions

@ -259,7 +259,10 @@ class SCSSCacherTest extends \Test\TestCase {
$folder = $this->createMock(ISimpleFolder::class);
$folder->expects($this->at(0))->method('getFile')->with($fileNameCSS)->willThrowException(new NotFoundException());
$actual = self::invokePrivate($this->scssCacher, 'isCached', [$fileNameCSS, $folder]);
$this->appData->expects($this->any())
->method('getFolder')
->willReturn($folder);
$actual = self::invokePrivate($this->scssCacher, 'isCached', [$fileNameCSS, 'core']);
$this->assertFalse($actual);
}
@ -280,7 +283,10 @@ class SCSSCacherTest extends \Test\TestCase {
}
}));
$actual = self::invokePrivate($this->scssCacher, 'isCached', [$fileNameCSS, $folder]);
$this->appData->expects($this->any())
->method('getFolder')
->willReturn($folder);
$actual = self::invokePrivate($this->scssCacher, 'isCached', [$fileNameCSS, 'core']);
$this->assertFalse($actual);
}
public function testCacheNoFile() {