diff options
Diffstat (limited to 'tests/Unit/Db')
-rw-r--r-- | tests/Unit/Db/FeedTest.php | 4 | ||||
-rw-r--r-- | tests/Unit/Db/FolderMapperTest.php | 4 | ||||
-rw-r--r-- | tests/Unit/Db/FolderTest.php | 3 | ||||
-rw-r--r-- | tests/Unit/Db/ItemTest.php | 4 | ||||
-rw-r--r-- | tests/Unit/Db/MapperFactoryTest.php | 4 | ||||
-rw-r--r-- | tests/Unit/Db/MapperTestUtility.php | 3 |
6 files changed, 13 insertions, 9 deletions
diff --git a/tests/Unit/Db/FeedTest.php b/tests/Unit/Db/FeedTest.php index 5e4e2a5a5..961e1d9b7 100644 --- a/tests/Unit/Db/FeedTest.php +++ b/tests/Unit/Db/FeedTest.php @@ -13,10 +13,10 @@ namespace OCA\News\Tests\Unit\Db; - +use PHPUnit\Framework\TestCase; use OCA\News\Db\Feed; -class FeedTest extends \PHPUnit_Framework_TestCase +class FeedTest extends TestCase { diff --git a/tests/Unit/Db/FolderMapperTest.php b/tests/Unit/Db/FolderMapperTest.php index bf7b1cae0..c8230ff0f 100644 --- a/tests/Unit/Db/FolderMapperTest.php +++ b/tests/Unit/Db/FolderMapperTest.php @@ -70,7 +70,7 @@ class FolderMapperTest extends MapperTestUtility $this->setMapperResult($sql, [$id, $userId]); - $this->setExpectedException( + $this->expectException( '\OCP\AppFramework\Db\DoesNotExistException' ); $this->folderMapper->find($id, $userId); @@ -88,7 +88,7 @@ class FolderMapperTest extends MapperTestUtility $this->setMapperResult($sql, [$id, $userId], $rows); - $this->setExpectedException( + $this->expectException( '\OCP\AppFramework\Db\MultipleObjectsReturnedException' ); $this->folderMapper->find($id, $userId); diff --git a/tests/Unit/Db/FolderTest.php b/tests/Unit/Db/FolderTest.php index 4db59cef2..a3445ea2e 100644 --- a/tests/Unit/Db/FolderTest.php +++ b/tests/Unit/Db/FolderTest.php @@ -14,8 +14,9 @@ namespace OCA\News\Tests\Unit\Db; use OCA\News\Db\Folder; +use PHPUnit\Framework\TestCase; -class FolderTest extends \PHPUnit_Framework_TestCase +class FolderTest extends TestCase { diff --git a/tests/Unit/Db/ItemTest.php b/tests/Unit/Db/ItemTest.php index f86c2c8a9..4c725b827 100644 --- a/tests/Unit/Db/ItemTest.php +++ b/tests/Unit/Db/ItemTest.php @@ -16,7 +16,9 @@ namespace OCA\News\Tests\Unit\Db; use OCA\News\Db\Feed; use OCA\News\Db\Item; -class ItemTest extends \PHPUnit_Framework_TestCase +use PHPUnit\Framework\TestCase; + +class ItemTest extends TestCase { /** diff --git a/tests/Unit/Db/MapperFactoryTest.php b/tests/Unit/Db/MapperFactoryTest.php index 94a49f850..697a62bee 100644 --- a/tests/Unit/Db/MapperFactoryTest.php +++ b/tests/Unit/Db/MapperFactoryTest.php @@ -16,14 +16,14 @@ namespace OCA\News\Tests\Unit\Db; use OCA\News\Db\ItemMapper; use OCA\News\Db\MapperFactory; use OCA\News\Utility\Time; -use PHPUnit_Framework_TestCase; +use PHPUnit\Framework\TestCase; use OCP\IDBConnection; use OCA\News\Db\Mysql\ItemMapper as MysqlMapper; -class MapperFactoryTest extends PHPUnit_Framework_TestCase +class MapperFactoryTest extends TestCase { private $db; diff --git a/tests/Unit/Db/MapperTestUtility.php b/tests/Unit/Db/MapperTestUtility.php index caef6527c..0c45a0bba 100644 --- a/tests/Unit/Db/MapperTestUtility.php +++ b/tests/Unit/Db/MapperTestUtility.php @@ -23,10 +23,11 @@ namespace OCA\News\Tests\Unit\Db; +use PHPUnit\Framework\TestCase; /** * Simple utility class for testing mappers */ -abstract class MapperTestUtility extends \PHPUnit_Framework_TestCase +abstract class MapperTestUtility extends TestCase { protected $db; private $query; |