diff options
Diffstat (limited to 'apps/federation/tests/Controller/SettingsControllerTest.php')
-rw-r--r-- | apps/federation/tests/Controller/SettingsControllerTest.php | 8 |
1 files changed, 5 insertions, 3 deletions
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') |