summaryrefslogtreecommitdiffstats
path: root/tests/lib/User/SessionTest.php
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2016-10-28 09:07:40 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2016-10-28 10:13:35 +0200
commitf722640a32a6c0a7fb0232abf8f57052d43d19c9 (patch)
treeea3d9e1def278a2d6d2c9164701840d87f573eff /tests/lib/User/SessionTest.php
parente7ec4601a36c28ad2940c66b4baeadac5cc7863e (diff)
downloadnextcloud-server-f722640a32a6c0a7fb0232abf8f57052d43d19c9.tar.gz
nextcloud-server-f722640a32a6c0a7fb0232abf8f57052d43d19c9.zip
Proper DI of config
* Fixed comments Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'tests/lib/User/SessionTest.php')
-rw-r--r--tests/lib/User/SessionTest.php30
1 files changed, 24 insertions, 6 deletions
diff --git a/tests/lib/User/SessionTest.php b/tests/lib/User/SessionTest.php
index 1b3d5cc4601..268d8e10e5a 100644
--- a/tests/lib/User/SessionTest.php
+++ b/tests/lib/User/SessionTest.php
@@ -190,7 +190,10 @@ class SessionTest extends \Test\TestCase {
unset($managerMethods[$i]);
}
}
- $manager = $this->getMockBuilder(Manager::class)->setMethods($managerMethods)->getMock();
+ $manager = $this->getMockBuilder(Manager::class)
+ ->setMethods($managerMethods)
+ ->setConstructorArgs([$this->config])
+ ->getMock();
$backend = $this->createMock(\Test\Util\User\Dummy::class);
@@ -245,7 +248,10 @@ class SessionTest extends \Test\TestCase {
unset($managerMethods[$i]);
}
}
- $manager = $this->getMockBuilder(Manager::class)->setMethods($managerMethods)->getMock();
+ $manager = $this->getMockBuilder(Manager::class)
+ ->setMethods($managerMethods)
+ ->setConstructorArgs([$this->config])
+ ->getMock();
$backend = $this->createMock(\Test\Util\User\Dummy::class);
@@ -277,7 +283,10 @@ class SessionTest extends \Test\TestCase {
unset($managerMethods[$i]);
}
}
- $manager = $this->getMockBuilder(Manager::class)->setMethods($managerMethods)->getMock();
+ $manager = $this->getMockBuilder(Manager::class)
+ ->setMethods($managerMethods)
+ ->setConstructorArgs([$this->config])
+ ->getMock();
$backend = $this->createMock(\Test\Util\User\Dummy::class);
$userSession = new \OC\User\Session($manager, $session, $this->timeFactory, $this->tokenProvider, $this->config);
@@ -527,7 +536,10 @@ class SessionTest extends \Test\TestCase {
unset($managerMethods[$i]);
}
}
- $manager = $this->getMockBuilder(Manager::class)->setMethods($managerMethods)->getMock();
+ $manager = $this->getMockBuilder(Manager::class)
+ ->setMethods($managerMethods)
+ ->setConstructorArgs([$this->config])
+ ->getMock();
$backend = $this->createMock(\Test\Util\User\Dummy::class);
@@ -577,7 +589,10 @@ class SessionTest extends \Test\TestCase {
unset($managerMethods[$i]);
}
}
- $manager = $this->getMockBuilder(Manager::class)->setMethods($managerMethods)->getMock();
+ $manager = $this->getMockBuilder(Manager::class)
+ ->setMethods($managerMethods)
+ ->setConstructorArgs([$this->config])
+ ->getMock();
$backend = $this->createMock(\Test\Util\User\Dummy::class);
@@ -621,7 +636,10 @@ class SessionTest extends \Test\TestCase {
unset($managerMethods[$i]);
}
}
- $manager = $this->getMockBuilder(Manager::class)->setMethods($managerMethods)->getMock();
+ $manager = $this->getMockBuilder(Manager::class)
+ ->setMethods($managerMethods)
+ ->setConstructorArgs([$this->config])
+ ->getMock();
$backend = $this->createMock(\Test\Util\User\Dummy::class);