diff options
Diffstat (limited to 'tests/lib/Files/Node/RootTest.php')
-rw-r--r-- | tests/lib/Files/Node/RootTest.php | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/tests/lib/Files/Node/RootTest.php b/tests/lib/Files/Node/RootTest.php index 70ffe1b25c4..5067236ec58 100644 --- a/tests/lib/Files/Node/RootTest.php +++ b/tests/lib/Files/Node/RootTest.php @@ -87,10 +87,10 @@ class RootTest extends \Test\TestCase { $this->assertInstanceOf('\OC\Files\Node\File', $node); } - /** - * @expectedException \OCP\Files\NotFoundException - */ + public function testGetNotFound() { + $this->expectException(\OCP\Files\NotFoundException::class); + /** * @var \OC\Files\Storage\Storage $storage */ @@ -121,10 +121,10 @@ class RootTest extends \Test\TestCase { $root->get('/bar/foo'); } - /** - * @expectedException \OCP\Files\NotPermittedException - */ + public function testGetInvalidPath() { + $this->expectException(\OCP\Files\NotPermittedException::class); + /** * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view */ @@ -143,10 +143,10 @@ class RootTest extends \Test\TestCase { $root->get('/../foo'); } - /** - * @expectedException \OCP\Files\NotFoundException - */ + public function testGetNoStorages() { + $this->expectException(\OCP\Files\NotFoundException::class); + /** * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view */ @@ -201,11 +201,11 @@ class RootTest extends \Test\TestCase { $this->assertEquals($folder, $root->getUserFolder('MyUserId')); } - /** - * @expectedException \OC\User\NoUserException - * @expectedExceptionMessage Backends provided no user object - */ + public function testGetUserFolderWithNoUserObj() { + $this->expectException(\OC\User\NoUserException::class); + $this->expectExceptionMessage('Backends provided no user object'); + $root = new \OC\Files\Node\Root( $this->createMock(Manager::class), $this->createMock(View::class), |