From 9d94cc16976970c84d5a88e090ea55be273be712 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Thu, 19 Jul 2018 23:15:56 +0200 Subject: Fix unit tests Signed-off-by: Roeland Jago Douma --- tests/lib/Template/SCSSCacherTest.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'tests') diff --git a/tests/lib/Template/SCSSCacherTest.php b/tests/lib/Template/SCSSCacherTest.php index 3840f3727f9..f32b87edcbb 100644 --- a/tests/lib/Template/SCSSCacherTest.php +++ b/tests/lib/Template/SCSSCacherTest.php @@ -113,7 +113,7 @@ class SCSSCacherTest extends \Test\TestCase { $fileDeps = $this->createMock(ISimpleFile::class); $gzfile = $this->createMock(ISimpleFile::class); $filePrefix = substr(md5(\OC_Util::getVersionString('core')), 0, 4) . '-' . - substr(md5('http://localhost/nextcloud'), 0, 4) . '-'; + substr(md5('http://localhost/nextcloud/index.php'), 0, 4) . '-'; $folder->method('getFile') ->will($this->returnCallback(function($path) use ($file, $gzfile, $filePrefix) { @@ -153,7 +153,7 @@ class SCSSCacherTest extends \Test\TestCase { $fileDeps = $this->createMock(ISimpleFile::class); $gzfile = $this->createMock(ISimpleFile::class); $filePrefix = substr(md5(\OC_Util::getVersionString('core')), 0, 4) . '-' . - substr(md5('http://localhost/nextcloud'), 0, 4) . '-'; + substr(md5('http://localhost/nextcloud/index.php'), 0, 4) . '-'; $folder->method('getFile') ->will($this->returnCallback(function($path) use ($file, $gzfile, $filePrefix) { @@ -189,7 +189,7 @@ class SCSSCacherTest extends \Test\TestCase { $fileDeps->expects($this->any())->method('getSize')->willReturn(1); $gzFile = $this->createMock(ISimpleFile::class); $filePrefix = substr(md5(\OC_Util::getVersionString('core')), 0, 4) . '-' . - substr(md5('http://localhost/nextcloud'), 0, 4) . '-'; + substr(md5('http://localhost/nextcloud/index.php'), 0, 4) . '-'; $folder->method('getFile') ->will($this->returnCallback(function($name) use ($file, $fileDeps, $gzFile, $filePrefix) { @@ -227,9 +227,8 @@ class SCSSCacherTest extends \Test\TestCase { $fileDeps->expects($this->any())->method('getSize')->willReturn(1); $gzFile = $this->createMock(ISimpleFile::class); - $filePrefix = substr(md5('http://localhost/nextcloud'), 0, 8) . '-'; $filePrefix = substr(md5(\OC_Util::getVersionString('core')), 0, 4) . '-' . - substr(md5('http://localhost/nextcloud'), 0, 4) . '-'; + substr(md5('http://localhost/nextcloud/index.php'), 0, 4) . '-'; $folder->method('getFile') ->will($this->returnCallback(function($name) use ($file, $fileDeps, $gzFile, $filePrefix) { if ($name === $filePrefix.'styles.css') { @@ -447,7 +446,7 @@ class SCSSCacherTest extends \Test\TestCase { ->method('linkToRoute') ->with('core.Css.getCss', [ 'fileName' => substr(md5($version), 0, 4) . '-' . - substr(md5('http://localhost/nextcloud'), 0, 4) . '-styles.css', + substr(md5('http://localhost/nextcloud/index.php'), 0, 4) . '-styles.css', 'appName' => $appName ]) ->willReturn(\OC::$WEBROOT . $result); -- cgit v1.2.3