Test fixes

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
John Molakvoæ (skjnldsv) 2017-12-14 11:28:59 +01:00
parent f2d5927ea3
commit 158f442f4f
No known key found for this signature in database
GPG Key ID: FB5ACEED51955BF8
1 changed files with 2 additions and 2 deletions

View File

@ -185,7 +185,7 @@ class SCSSCacherTest extends \Test\TestCase {
$fileDeps->expects($this->any())->method('getSize')->willReturn(1); $fileDeps->expects($this->any())->method('getSize')->willReturn(1);
$gzFile = $this->createMock(ISimpleFile::class); $gzFile = $this->createMock(ISimpleFile::class);
$filePrefix = md5('http://localhost/nextcloud') . '-'; $filePrefix = substr(md5('http://localhost/nextcloud'), 0, 8) . '-';
$folder->method('getFile') $folder->method('getFile')
->will($this->returnCallback(function($name) use ($file, $fileDeps, $gzFile, $filePrefix) { ->will($this->returnCallback(function($name) use ($file, $fileDeps, $gzFile, $filePrefix) {
if ($name === $filePrefix.'styles.css') { if ($name === $filePrefix.'styles.css') {
@ -385,7 +385,7 @@ class SCSSCacherTest extends \Test\TestCase {
$this->urlGenerator->expects($this->once()) $this->urlGenerator->expects($this->once())
->method('linkToRoute') ->method('linkToRoute')
->with('core.Css.getCss', [ ->with('core.Css.getCss', [
'fileName' => md5('http://localhost/nextcloud') . '-styles.css', 'fileName' => substr(md5('http://localhost/nextcloud'), 0, 8) . '-styles.css',
'appName' => $appName 'appName' => $appName
]) ])
->willReturn(\OC::$WEBROOT . $result); ->willReturn(\OC::$WEBROOT . $result);