diff options
author | Daniel Opitz <git@copynpaste.de> | 2018-10-16 22:37:48 +0200 |
---|---|---|
committer | Sean Molenaar <SMillerDev@users.noreply.github.com> | 2018-12-04 17:10:46 +0100 |
commit | e158cc1d3b1fb33de5aaa1aaac0c7828016fb7b9 (patch) | |
tree | 4d3b4da643a428f259ca9fe1c63d97f8cecfb5fc /tests/Unit/Db/FolderMapperTest.php | |
parent | 5c7fdb08534018ba86ec4a38f45b63cbbf67a72f (diff) |
use magic class constant instead of classname strings
Diffstat (limited to 'tests/Unit/Db/FolderMapperTest.php')
-rw-r--r-- | tests/Unit/Db/FolderMapperTest.php | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/tests/Unit/Db/FolderMapperTest.php b/tests/Unit/Db/FolderMapperTest.php index f3ee15456..11c411b5e 100644 --- a/tests/Unit/Db/FolderMapperTest.php +++ b/tests/Unit/Db/FolderMapperTest.php @@ -16,6 +16,8 @@ namespace OCA\News\Tests\Unit\Db; use OCA\News\Db\Folder; use OCA\News\Db\FolderMapper; use OCA\News\Utility\Time; +use OCP\AppFramework\Db\DoesNotExistException; +use OCP\AppFramework\Db\MultipleObjectsReturnedException; class FolderMapperTest extends MapperTestUtility { @@ -76,9 +78,7 @@ class FolderMapperTest extends MapperTestUtility $this->setMapperResult($sql, [$id, $userId]); - $this->expectException( - '\OCP\AppFramework\Db\DoesNotExistException' - ); + $this->expectException(DoesNotExistException::class); $this->folderMapper->find($id, $userId); } @@ -94,9 +94,7 @@ class FolderMapperTest extends MapperTestUtility $this->setMapperResult($sql, [$id, $userId], $rows); - $this->expectException( - '\OCP\AppFramework\Db\MultipleObjectsReturnedException' - ); + $this->expectException(MultipleObjectsReturnedException::class); $this->folderMapper->find($id, $userId); } |