summaryrefslogtreecommitdiffstats
path: root/tests/lib/UrlGeneratorTest.php
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2017-12-28 14:19:13 +0100
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2017-12-30 05:55:45 +0100
commitc0c4443ffc6608ea2917a9c5bec1c0150a94b404 (patch)
tree9a12ec15ec2e2a76ebde403647936a8fa2494c9d /tests/lib/UrlGeneratorTest.php
parentb71c9205ef784b7aa55f5f51207f9ba49e077a2f (diff)
downloadnextcloud-server-c0c4443ffc6608ea2917a9c5bec1c0150a94b404.tar.gz
nextcloud-server-c0c4443ffc6608ea2917a9c5bec1c0150a94b404.zip
Fixed tests
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'tests/lib/UrlGeneratorTest.php')
-rw-r--r--tests/lib/UrlGeneratorTest.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/lib/UrlGeneratorTest.php b/tests/lib/UrlGeneratorTest.php
index 69067f51e08..340c9c7082d 100644
--- a/tests/lib/UrlGeneratorTest.php
+++ b/tests/lib/UrlGeneratorTest.php
@@ -27,6 +27,8 @@ class UrlGeneratorTest extends \Test\TestCase {
private $request;
/** @var IURLGenerator */
private $urlGenerator;
+ /** @var string */
+ private $originalWebRoot;
public function setUp() {
parent::setUp();
@@ -38,6 +40,12 @@ class UrlGeneratorTest extends \Test\TestCase {
$this->cacheFactory,
$this->request
);
+ $this->originalWebRoot = \OC::$WEBROOT;
+ }
+
+ public function tearDown() {
+ // Reset webRoot
+ \OC::$WEBROOT = $this->originalWebRoot;
}
private function mockBaseUrl() {
@@ -47,7 +55,6 @@ class UrlGeneratorTest extends \Test\TestCase {
$this->request->expects($this->once())
->method('getServerHost')
->willReturn('localhost');
-
}
/**
@@ -156,4 +163,3 @@ class UrlGeneratorTest extends \Test\TestCase {
}
}
-