summaryrefslogtreecommitdiffstats
path: root/tests/lib/CapabilitiesManagerTest.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 /tests/lib/CapabilitiesManagerTest.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 'tests/lib/CapabilitiesManagerTest.php')
-rw-r--r--tests/lib/CapabilitiesManagerTest.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/lib/CapabilitiesManagerTest.php b/tests/lib/CapabilitiesManagerTest.php
index f4222a83ef8..e7d519a7493 100644
--- a/tests/lib/CapabilitiesManagerTest.php
+++ b/tests/lib/CapabilitiesManagerTest.php
@@ -35,7 +35,7 @@ class CapabilitiesManagerTest extends TestCase {
/** @var ILogger */
private $logger;
- public function setUp(): void {
+ protected function setUp(): void {
parent::setUp();
$this->logger = $this->getMockBuilder(ILogger::class)->getMock();
$this->manager = new CapabilitiesManager($this->logger);
@@ -81,10 +81,11 @@ class CapabilitiesManagerTest extends TestCase {
/**
* Test that we need something that implents ICapability
- * @expectedException \InvalidArgumentException
- * @expectedExceptionMessage The given Capability (Test\NoCapability) does not implement the ICapability interface
*/
public function testNoICapability() {
+ $this->expectException(\InvalidArgumentException::class);
+ $this->expectExceptionMessage('The given Capability (Test\\NoCapability) does not implement the ICapability interface');
+
$this->manager->registerCapability(function() {
return new NoCapability();
});