Mock logger

This commit is contained in:
Roeland Jago Douma 2016-07-10 14:19:55 +02:00
parent 2fa9e67294
commit 937c9519d6
No known key found for this signature in database
GPG Key ID: 1E152838F164D13B
1 changed files with 3 additions and 3 deletions

View File

@ -76,7 +76,7 @@ class RoutingTest extends \Test\TestCase
// router mock
$router = $this->getMockBuilder('\OC\Route\Router')
->setMethods(['create'])
->setConstructorArgs([\OC::$server->getLogger()])
->setConstructorArgs([$this->getMockBuilder('\OCP\ILogger')->getMock()])
->getMock();
// load route configuration
@ -129,7 +129,7 @@ class RoutingTest extends \Test\TestCase
// router mock
$router = $this->getMockBuilder('\OC\Route\Router')
->setMethods(['create'])
->setConstructorArgs([\OC::$server->getLogger()])
->setConstructorArgs([$this->getMockBuilder('\OCP\ILogger')->getMock()])
->getMock();
// we expect create to be called once:
@ -156,7 +156,7 @@ class RoutingTest extends \Test\TestCase
// router mock
$router = $this->getMockBuilder('\OC\Route\Router')
->setMethods(['create'])
->setConstructorArgs([\OC::$server->getLogger()])
->setConstructorArgs([$this->getMockBuilder('\OCP\ILogger')->getMock()])
->getMock();
// route mocks