diff options
Diffstat (limited to 'vendor/sabre/dav/tests/Sabre/DAV/BasicNodeTest.php')
-rw-r--r-- | vendor/sabre/dav/tests/Sabre/DAV/BasicNodeTest.php | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/vendor/sabre/dav/tests/Sabre/DAV/BasicNodeTest.php b/vendor/sabre/dav/tests/Sabre/DAV/BasicNodeTest.php index e9a8eddad..60fcc73fc 100644 --- a/vendor/sabre/dav/tests/Sabre/DAV/BasicNodeTest.php +++ b/vendor/sabre/dav/tests/Sabre/DAV/BasicNodeTest.php @@ -6,16 +6,20 @@ namespace Sabre\DAV; class BasicNodeTest extends \PHPUnit\Framework\TestCase { + /** + * @expectedException \Sabre\DAV\Exception\Forbidden + */ public function testPut() { - $this->expectException('Sabre\DAV\Exception\Forbidden'); $file = new FileMock(); $file->put('hi'); } + /** + * @expectedException \Sabre\DAV\Exception\Forbidden + */ public function testGet() { - $this->expectException('Sabre\DAV\Exception\Forbidden'); $file = new FileMock(); $file->get(); } @@ -38,16 +42,20 @@ class BasicNodeTest extends \PHPUnit\Framework\TestCase $this->assertNull($file->getContentType()); } + /** + * @expectedException \Sabre\DAV\Exception\Forbidden + */ public function testDelete() { - $this->expectException('Sabre\DAV\Exception\Forbidden'); $file = new FileMock(); $file->delete(); } + /** + * @expectedException \Sabre\DAV\Exception\Forbidden + */ public function testSetName() { - $this->expectException('Sabre\DAV\Exception\Forbidden'); $file = new FileMock(); $file->setName('hi'); } @@ -80,23 +88,29 @@ class BasicNodeTest extends \PHPUnit\Framework\TestCase $this->assertFalse($dir->childExists('mockfile2')); } + /** + * @expectedException \Sabre\DAV\Exception\NotFound + */ public function testGetChild404() { - $this->expectException('Sabre\DAV\Exception\NotFound'); $dir = new DirectoryMock(); $file = $dir->getChild('blabla'); } + /** + * @expectedException \Sabre\DAV\Exception\Forbidden + */ public function testCreateFile() { - $this->expectException('Sabre\DAV\Exception\Forbidden'); $dir = new DirectoryMock(); $dir->createFile('hello', 'data'); } + /** + * @expectedException \Sabre\DAV\Exception\Forbidden + */ public function testCreateDirectory() { - $this->expectException('Sabre\DAV\Exception\Forbidden'); $dir = new DirectoryMock(); $dir->createDirectory('hello'); } |