diff --git a/tests/command/createaccounttest.php b/tests/command/createaccounttest.php index 5ab090c2d9..57ffa22d0b 100644 --- a/tests/command/createaccounttest.php +++ b/tests/command/createaccounttest.php @@ -51,7 +51,7 @@ protected function setUp() { $this->service = $this->getMockBuilder('\OCA\Mail\Service\AccountService') ->disableOriginalConstructor() ->getMock(); - $this->crypto = $this->getMock('\OCP\Security\ICrypto'); + $this->crypto = $this->getMockBuilder('\OCP\Security\ICrypto')->getMock(); $this->command = new CreateAccount($this->service, $this->crypto); } diff --git a/tests/controller/autoconfigcontrollertest.php b/tests/controller/autoconfigcontrollertest.php index 57f07ce24e..a44e2058c6 100644 --- a/tests/controller/autoconfigcontrollertest.php +++ b/tests/controller/autoconfigcontrollertest.php @@ -30,7 +30,7 @@ class AutoConfigControllerTest extends TestCase { protected function setUp() { parent::setUp(); - $this->request = $this->getMock('OCP\IRequest'); + $this->request = $this->getMockBuilder('OCP\IRequest')->getMock(); $this->service = $this->getMockBuilder('OCA\Mail\Service\AutoCompletion\AutoCompleteService') ->disableOriginalConstructor() ->getMock(); diff --git a/tests/controller/pagecontrollertest.php b/tests/controller/pagecontrollertest.php index a7f6e2cc76..dbdea00be9 100644 --- a/tests/controller/pagecontrollertest.php +++ b/tests/controller/pagecontrollertest.php @@ -58,8 +58,8 @@ protected function setUp() { } public function testIndex() { - $account1 = $this->getMock('OCA\Mail\Service\IAccount'); - $account2 = $this->getMock('OCA\Mail\Service\IAccount'); + $account1 = $this->getMockBuilder('OCA\Mail\Service\IAccount')->getMock(); + $account2 = $this->getMockBuilder('OCA\Mail\Service\IAccount')->getMock(); $this->accountService->expects($this->once()) ->method('findByUserId') diff --git a/tests/controller/proxycontrollertest.php b/tests/controller/proxycontrollertest.php index c15955cf53..da4c05b073 100644 --- a/tests/controller/proxycontrollertest.php +++ b/tests/controller/proxycontrollertest.php @@ -47,8 +47,8 @@ protected function setUp() { $this->session = $this->getMockBuilder('\OCP\ISession') ->disableOriginalConstructor() ->getMock(); - $this->clientService = $this->getMock('\OCP\Http\Client\IClientService'); - $this->client = $this->getMock('\OCP\Http\Client\IClient'); + $this->clientService = $this->getMockBuilder('\OCP\Http\Client\IClientService')->getMock(); + $this->client = $this->getMockBuilder('\OCP\Http\Client\IClient')->getMock(); $this->clientService->expects($this->any()) ->method('getClient') ->will($this->returnValue($this->client)); diff --git a/tests/service/loggertest.php b/tests/service/loggertest.php index 6769cdb625..aed3606092 100644 --- a/tests/service/loggertest.php +++ b/tests/service/loggertest.php @@ -34,7 +34,7 @@ class LoggerTest extends TestCase { */ public function testLoggerMethod($method, $param = '1') { - $baseLogger = $this->getMock('\OCP\ILogger'); + $baseLogger = $this->getMockBuilder('\OCP\ILogger')->getMock(); $baseLogger->expects($this->once()) ->method($method) ->with(