diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2019-11-27 17:27:18 +0300 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2019-11-27 17:27:18 +0300 |
commit | 3a7cf40aaa678bea1df143d2982d603b7a334eec (patch) | |
tree | 63c1e3ad7f7f401d14411a4d44c523632906afc9 /apps/federatedfilesharing/tests | |
parent | 0568b012672d650c6b5a49e72c4028dde5463c60 (diff) |
Mode to modern phpunit
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/federatedfilesharing/tests')
6 files changed, 9 insertions, 8 deletions
diff --git a/apps/federatedfilesharing/tests/AddressHandlerTest.php b/apps/federatedfilesharing/tests/AddressHandlerTest.php index efea34dbab2..e6ef4ddd7f3 100644 --- a/apps/federatedfilesharing/tests/AddressHandlerTest.php +++ b/apps/federatedfilesharing/tests/AddressHandlerTest.php @@ -46,7 +46,7 @@ class AddressHandlerTest extends \Test\TestCase { /** @var CloudIdManager */ private $cloudIdManager; - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $this->urlGenerator = $this->getMockBuilder(IURLGenerator::class) @@ -125,9 +125,10 @@ class AddressHandlerTest extends \Test\TestCase { * @dataProvider dataTestSplitUserRemoteError * * @param string $id - * @expectedException \OC\HintException */ public function testSplitUserRemoteError($id) { + $this->expectException(\OC\HintException::class); + $this->addressHandler->splitUserRemote($id); } diff --git a/apps/federatedfilesharing/tests/Controller/MountPublicLinkControllerTest.php b/apps/federatedfilesharing/tests/Controller/MountPublicLinkControllerTest.php index 88f486f3c69..405d83cc91c 100644 --- a/apps/federatedfilesharing/tests/Controller/MountPublicLinkControllerTest.php +++ b/apps/federatedfilesharing/tests/Controller/MountPublicLinkControllerTest.php @@ -84,7 +84,7 @@ class MountPublicLinkControllerTest extends \Test\TestCase { /** @var ICloudIdManager */ private $cloudIdManager; - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $this->request = $this->getMockBuilder(IRequest::class)->disableOriginalConstructor()->getMock(); diff --git a/apps/federatedfilesharing/tests/FederatedShareProviderTest.php b/apps/federatedfilesharing/tests/FederatedShareProviderTest.php index 31d13df8f31..1e0863fe1ce 100644 --- a/apps/federatedfilesharing/tests/FederatedShareProviderTest.php +++ b/apps/federatedfilesharing/tests/FederatedShareProviderTest.php @@ -85,7 +85,7 @@ class FederatedShareProviderTest extends \Test\TestCase { /** @var \PHPUnit_Framework_MockObject_MockObject|ICloudFederationProviderManager */ private $cloudFederationProviderManager; - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $this->connection = \OC::$server->getDatabaseConnection(); @@ -131,7 +131,7 @@ class FederatedShareProviderTest extends \Test\TestCase { $this->shareManager = \OC::$server->getShareManager(); } - public function tearDown(): void { + protected function tearDown(): void { $this->connection->getQueryBuilder()->delete('share')->execute(); parent::tearDown(); diff --git a/apps/federatedfilesharing/tests/NotificationsTest.php b/apps/federatedfilesharing/tests/NotificationsTest.php index 769184f1628..abc8e9495bc 100644 --- a/apps/federatedfilesharing/tests/NotificationsTest.php +++ b/apps/federatedfilesharing/tests/NotificationsTest.php @@ -53,7 +53,7 @@ class NotificationsTest extends \Test\TestCase { /** @var ICloudFederationFactory|\PHPUnit_Framework_MockObject_MockObject */ private $cloudFederationFactory; - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $this->jobList = $this->getMockBuilder('OCP\BackgroundJob\IJobList')->getMock(); diff --git a/apps/federatedfilesharing/tests/Settings/AdminTest.php b/apps/federatedfilesharing/tests/Settings/AdminTest.php index bca8ad73426..7eccf846f4b 100644 --- a/apps/federatedfilesharing/tests/Settings/AdminTest.php +++ b/apps/federatedfilesharing/tests/Settings/AdminTest.php @@ -38,7 +38,7 @@ class AdminTest extends TestCase { /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */ private $gsConfig; - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $this->federatedShareProvider = $this->createMock(FederatedShareProvider::class); $this->gsConfig = $this->createMock(IConfig::class); diff --git a/apps/federatedfilesharing/tests/TokenHandlerTest.php b/apps/federatedfilesharing/tests/TokenHandlerTest.php index bd3c0f92911..56039b1f801 100644 --- a/apps/federatedfilesharing/tests/TokenHandlerTest.php +++ b/apps/federatedfilesharing/tests/TokenHandlerTest.php @@ -39,7 +39,7 @@ class TokenHandlerTest extends \Test\TestCase { /** @var int */ private $expectedTokenLength = 15; - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $this->secureRandom = $this->getMockBuilder(ISecureRandom::class)->getMock(); |