aboutsummaryrefslogtreecommitdiffstats
path: root/apps/federation/tests/TrustedServersTest.php
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2019-11-27 15:27:18 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2019-11-27 15:27:18 +0100
commit3a7cf40aaa678bea1df143d2982d603b7a334eec (patch)
tree63c1e3ad7f7f401d14411a4d44c523632906afc9 /apps/federation/tests/TrustedServersTest.php
parent0568b012672d650c6b5a49e72c4028dde5463c60 (diff)
downloadnextcloud-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/TrustedServersTest.php')
-rw-r--r--apps/federation/tests/TrustedServersTest.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/federation/tests/TrustedServersTest.php b/apps/federation/tests/TrustedServersTest.php
index 82e5654e63f..2b1f8174e09 100644
--- a/apps/federation/tests/TrustedServersTest.php
+++ b/apps/federation/tests/TrustedServersTest.php
@@ -76,7 +76,7 @@ class TrustedServersTest extends TestCase {
/** @var \PHPUnit_Framework_MockObject_MockObject|ITimeFactory */
private $timeFactory;
- public function setUp(): void {
+ protected function setUp(): void {
parent::setUp();
$this->dbHandler = $this->getMockBuilder(DbHandler::class)
@@ -352,10 +352,11 @@ class TrustedServersTest extends TestCase {
/**
* @dataProvider dataTestCheckOwnCloudVersionTooLow
- * @expectedException \OC\HintException
- * @expectedExceptionMessage Remote server version is too low. 9.0 is required.
*/
public function testCheckOwnCloudVersionTooLow($status) {
+ $this->expectException(\OC\HintException::class);
+ $this->expectExceptionMessage('Remote server version is too low. 9.0 is required.');
+
$this->invokePrivate($this->trustedServers, 'checkOwnCloudVersion', [$status]);
}