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

View file

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