summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2018-07-19 23:15:56 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2018-07-19 23:18:35 +0200
commit9d94cc16976970c84d5a88e090ea55be273be712 (patch)
treee07ab49b7c657f0fb1ccf1bc8259e5a60840cc4c /tests
parent37a4d2bbbc651ca6838bf0049720087565fc3c87 (diff)
downloadnextcloud-server-9d94cc16976970c84d5a88e090ea55be273be712.tar.gz
nextcloud-server-9d94cc16976970c84d5a88e090ea55be273be712.zip
Fix unit tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/Template/SCSSCacherTest.php11
1 files changed, 5 insertions, 6 deletions
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);