diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2019-11-27 15:27:18 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2019-11-27 15:27:18 +0100 |
commit | 3a7cf40aaa678bea1df143d2982d603b7a334eec (patch) | |
tree | 63c1e3ad7f7f401d14411a4d44c523632906afc9 /apps/federation/tests/Controller | |
parent | 0568b012672d650c6b5a49e72c4028dde5463c60 (diff) | |
download | nextcloud-server-3a7cf40aaa678bea1df143d2982d603b7a334eec.tar.gz nextcloud-server-3a7cf40aaa678bea1df143d2982d603b7a334eec.zip |
Mode to modern phpunit
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/federation/tests/Controller')
-rw-r--r-- | apps/federation/tests/Controller/OCSAuthAPIControllerTest.php | 2 | ||||
-rw-r--r-- | apps/federation/tests/Controller/SettingsControllerTest.php | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/apps/federation/tests/Controller/OCSAuthAPIControllerTest.php b/apps/federation/tests/Controller/OCSAuthAPIControllerTest.php index c625d960e5a..d862faeae1b 100644 --- a/apps/federation/tests/Controller/OCSAuthAPIControllerTest.php +++ b/apps/federation/tests/Controller/OCSAuthAPIControllerTest.php @@ -67,7 +67,7 @@ class OCSAuthAPIControllerTest extends TestCase { /** @var int simulated timestamp */ private $currentTime = 1234567; - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $this->request = $this->createMock(IRequest::class); diff --git a/apps/federation/tests/Controller/SettingsControllerTest.php b/apps/federation/tests/Controller/SettingsControllerTest.php index 9b283b50903..2aa2a454f66 100644 --- a/apps/federation/tests/Controller/SettingsControllerTest.php +++ b/apps/federation/tests/Controller/SettingsControllerTest.php @@ -45,7 +45,7 @@ class SettingsControllerTest extends TestCase { /** @var \PHPUnit_Framework_MockObject_MockObject | \OCA\Federation\TrustedServers */ private $trustedServers; - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $this->request = $this->getMockBuilder(IRequest::class)->getMock(); @@ -84,12 +84,13 @@ class SettingsControllerTest extends TestCase { /** * @dataProvider checkServerFails - * @expectedException \OC\HintException * * @param bool $isTrustedServer * @param bool $isOwnCloud */ public function testAddServerFail($isTrustedServer, $isOwnCloud) { + $this->expectException(\OC\HintException::class); + $this->trustedServers ->expects($this->any()) ->method('isTrustedServer') @@ -132,12 +133,13 @@ class SettingsControllerTest extends TestCase { /** * @dataProvider checkServerFails - * @expectedException \OC\HintException * * @param bool $isTrustedServer * @param bool $isOwnCloud */ public function testCheckServerFail($isTrustedServer, $isOwnCloud) { + $this->expectException(\OC\HintException::class); + $this->trustedServers ->expects($this->any()) ->method('isTrustedServer') |