Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'apps/dav/tests/unit/SystemTag/SystemTagsByIdCollectionTest.php')
-rw-r--r--apps/dav/tests/unit/SystemTag/SystemTagsByIdCollectionTest.php36
1 files changed, 18 insertions, 18 deletions
diff --git a/apps/dav/tests/unit/SystemTag/SystemTagsByIdCollectionTest.php b/apps/dav/tests/unit/SystemTag/SystemTagsByIdCollectionTest.php
index da46843a5b2..496caebc907 100644
--- a/apps/dav/tests/unit/SystemTag/SystemTagsByIdCollectionTest.php
+++ b/apps/dav/tests/unit/SystemTag/SystemTagsByIdCollectionTest.php
@@ -80,17 +80,17 @@ class SystemTagsByIdCollectionTest extends \Test\TestCase {
return [[true], [false]];
}
- /**
- * @expectedException \Sabre\DAV\Exception\Forbidden
- */
+
public function testForbiddenCreateFile() {
+ $this->expectException(\Sabre\DAV\Exception\Forbidden::class);
+
$this->getNode()->createFile('555');
}
- /**
- * @expectedException \Sabre\DAV\Exception\Forbidden
- */
+
public function testForbiddenCreateDirectory() {
+ $this->expectException(\Sabre\DAV\Exception\Forbidden::class);
+
$this->getNode()->createDirectory('789');
}
@@ -113,10 +113,10 @@ class SystemTagsByIdCollectionTest extends \Test\TestCase {
$this->assertEquals($tag, $childNode->getSystemTag());
}
- /**
- * @expectedException \Sabre\DAV\Exception\BadRequest
- */
+
public function testGetChildInvalidName() {
+ $this->expectException(\Sabre\DAV\Exception\BadRequest::class);
+
$this->tagManager->expects($this->once())
->method('getTagsByIds')
->with(['invalid'])
@@ -125,10 +125,10 @@ class SystemTagsByIdCollectionTest extends \Test\TestCase {
$this->getNode()->getChild('invalid');
}
- /**
- * @expectedException \Sabre\DAV\Exception\NotFound
- */
+
public function testGetChildNotFound() {
+ $this->expectException(\Sabre\DAV\Exception\NotFound::class);
+
$this->tagManager->expects($this->once())
->method('getTagsByIds')
->with(['444'])
@@ -137,10 +137,10 @@ class SystemTagsByIdCollectionTest extends \Test\TestCase {
$this->getNode()->getChild('444');
}
- /**
- * @expectedException \Sabre\DAV\Exception\NotFound
- */
+
public function testGetChildUserNotVisible() {
+ $this->expectException(\Sabre\DAV\Exception\NotFound::class);
+
$tag = new SystemTag(123, 'Test', false, false);
$this->tagManager->expects($this->once())
@@ -231,10 +231,10 @@ class SystemTagsByIdCollectionTest extends \Test\TestCase {
$this->assertFalse($this->getNode()->childExists('123'));
}
- /**
- * @expectedException \Sabre\DAV\Exception\BadRequest
- */
+
public function testChildExistsBadRequest() {
+ $this->expectException(\Sabre\DAV\Exception\BadRequest::class);
+
$this->tagManager->expects($this->once())
->method('getTagsByIds')
->with(['invalid'])