diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2016-08-31 20:54:17 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2016-08-31 20:54:17 +0200 |
commit | 62485ed08f2ae12c1c6dc92d1b9be020c67001ca (patch) | |
tree | 2bcfddd7d2dfd1f836c2a9e3f6ce1469a598ecd2 /apps/federation/tests/BackgroundJob | |
parent | 2685129184472a308a3ba7730207816151b0ffd7 (diff) | |
download | nextcloud-server-62485ed08f2ae12c1c6dc92d1b9be020c67001ca.tar.gz nextcloud-server-62485ed08f2ae12c1c6dc92d1b9be020c67001ca.zip |
Fix deprecated getMock call in Federation app
Diffstat (limited to 'apps/federation/tests/BackgroundJob')
-rw-r--r-- | apps/federation/tests/BackgroundJob/GetSharedSecretTest.php | 14 | ||||
-rw-r--r-- | apps/federation/tests/BackgroundJob/RequestSharedSecretTest.php | 12 |
2 files changed, 13 insertions, 13 deletions
diff --git a/apps/federation/tests/BackgroundJob/GetSharedSecretTest.php b/apps/federation/tests/BackgroundJob/GetSharedSecretTest.php index 0746c517fa7..fe7cc5cc337 100644 --- a/apps/federation/tests/BackgroundJob/GetSharedSecretTest.php +++ b/apps/federation/tests/BackgroundJob/GetSharedSecretTest.php @@ -73,15 +73,15 @@ class GetSharedSecretTest extends TestCase { public function setUp() { parent::setUp(); - $this->httpClient = $this->getMock('OCP\Http\Client\IClient'); - $this->jobList = $this->getMock('OCP\BackgroundJob\IJobList'); - $this->urlGenerator = $this->getMock('OCP\IURLGenerator'); - $this->trustedServers = $this->getMockBuilder('OCA\Federation\TrustedServers') + $this->httpClient = $this->getMockBuilder(IClient::class)->getMock(); + $this->jobList = $this->getMockBuilder(IJobList::class)->getMock(); + $this->urlGenerator = $this->getMockBuilder(IURLGenerator::class)->getMock(); + $this->trustedServers = $this->getMockBuilder(TrustedServers::class) ->disableOriginalConstructor()->getMock(); - $this->dbHandler = $this->getMockBuilder('OCA\Federation\DbHandler') + $this->dbHandler = $this->getMockBuilder(DbHandler::class) ->disableOriginalConstructor()->getMock(); - $this->logger = $this->getMock('OCP\ILogger'); - $this->response = $this->getMock('OCP\Http\Client\IResponse'); + $this->logger = $this->getMockBuilder(ILogger::class)->getMock(); + $this->response = $this->getMockBuilder(IResponse::class)->getMock(); $this->getSharedSecret = new GetSharedSecret( $this->httpClient, diff --git a/apps/federation/tests/BackgroundJob/RequestSharedSecretTest.php b/apps/federation/tests/BackgroundJob/RequestSharedSecretTest.php index 339a2cbad00..3fa2ca2973e 100644 --- a/apps/federation/tests/BackgroundJob/RequestSharedSecretTest.php +++ b/apps/federation/tests/BackgroundJob/RequestSharedSecretTest.php @@ -61,14 +61,14 @@ class RequestSharedSecretTest extends TestCase { public function setUp() { parent::setUp(); - $this->httpClient = $this->getMock('OCP\Http\Client\IClient'); - $this->jobList = $this->getMock('OCP\BackgroundJob\IJobList'); - $this->urlGenerator = $this->getMock('OCP\IURLGenerator'); - $this->trustedServers = $this->getMockBuilder('OCA\Federation\TrustedServers') + $this->httpClient = $this->getMockBuilder(IClient::class)->getMock(); + $this->jobList = $this->getMockBuilder(IJobList::class)->getMock(); + $this->urlGenerator = $this->getMockBuilder(IURLGenerator::class)->getMock(); + $this->trustedServers = $this->getMockBuilder(TrustedServers::class) ->disableOriginalConstructor()->getMock(); - $this->dbHandler = $this->getMockBuilder('OCA\Federation\DbHandler') + $this->dbHandler = $this->getMockBuilder(DbHandler::class) ->disableOriginalConstructor()->getMock(); - $this->response = $this->getMock('OCP\Http\Client\IResponse'); + $this->response = $this->getMockBuilder(IResponse::class)->getMock(); $this->requestSharedSecret = new RequestSharedSecret( $this->httpClient, |