summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorSean Molenaar <sean@m2mobi.com>2018-10-01 10:07:57 +0200
committerSean Molenaar <sean@m2mobi.com>2018-10-02 14:33:09 +0200
commitfa5f07ba9a77959796c3c7a4851f2f2fe1051afa (patch)
treec0eedead6788614b886940f892f23c6537368a19 /tests
parentc36b0a95685cb0daa3fce9d743b7610a5cfe50ed (diff)
Put back old tests for stable nextcloud version
Diffstat (limited to 'tests')
-rw-r--r--tests/Integration/IntegrationTest.php2
-rw-r--r--tests/Unit/Config/ConfigTest.php5
-rw-r--r--tests/Unit/Controller/AdminControllerTest.php3
-rw-r--r--tests/Unit/Controller/EntityApiSerializerTest.php4
-rw-r--r--tests/Unit/Controller/ExportControllerTest.php3
-rw-r--r--tests/Unit/Controller/FeedApiControllerTest.php3
-rw-r--r--tests/Unit/Controller/FeedControllerTest.php3
-rw-r--r--tests/Unit/Controller/FolderApiControllerTest.php4
-rw-r--r--tests/Unit/Controller/FolderControllerTest.php4
-rw-r--r--tests/Unit/Controller/ItemApiControllerTest.php4
-rw-r--r--tests/Unit/Controller/ItemControllerTest.php4
-rw-r--r--tests/Unit/Controller/JSONHttpErrorTest.php4
-rw-r--r--tests/Unit/Controller/PageControllerTest.php3
-rw-r--r--tests/Unit/Controller/UserApiControllerTest.php4
-rw-r--r--tests/Unit/Controller/UtilityApiControllerTest.php4
-rw-r--r--tests/Unit/Db/FeedTest.php4
-rw-r--r--tests/Unit/Db/FolderMapperTest.php4
-rw-r--r--tests/Unit/Db/FolderTest.php3
-rw-r--r--tests/Unit/Db/ItemTest.php4
-rw-r--r--tests/Unit/Db/MapperFactoryTest.php4
-rw-r--r--tests/Unit/Db/MapperTestUtility.php3
-rw-r--r--tests/Unit/Fetcher/FeedFetcherTest.php3
-rw-r--r--tests/Unit/Fetcher/FetcherTest.php3
-rw-r--r--tests/Unit/Fetcher/YoutubeFetcherTest.php3
-rw-r--r--tests/Unit/Http/TextDownloadResponseTest.php3
-rw-r--r--tests/Unit/Http/TextResponseTest.php4
-rw-r--r--tests/Unit/Service/FeedServiceTest.php14
-rw-r--r--tests/Unit/Service/FolderServiceTest.php10
-rw-r--r--tests/Unit/Service/ItemServiceTest.php10
-rw-r--r--tests/Unit/Service/ServiceTest.php7
-rw-r--r--tests/Unit/Service/StatusServiceTest.php3
-rw-r--r--tests/Unit/Utility/OPMLExporterTest.php3
-rw-r--r--tests/Unit/Utility/ProxyConfigParserTest.php3
-rw-r--r--tests/Unit/Utility/UpdaterTest.php4
34 files changed, 91 insertions, 55 deletions
diff --git a/tests/Integration/IntegrationTest.php b/tests/Integration/IntegrationTest.php
index 751cbe5fd..8dbdec802 100644
--- a/tests/Integration/IntegrationTest.php
+++ b/tests/Integration/IntegrationTest.php
@@ -12,7 +12,7 @@
namespace OCA\News\Tests\Integration;
-use PHPUnit_Framework_TestCase;
+use PHPUnit\Framework\TestCase;
use OCA\News\Db\Feed;
use OCA\News\Db\Item;
diff --git a/tests/Unit/Config/ConfigTest.php b/tests/Unit/Config/ConfigTest.php
index 42d3c6e62..36e800ba4 100644
--- a/tests/Unit/Config/ConfigTest.php
+++ b/tests/Unit/Config/ConfigTest.php
@@ -14,10 +14,9 @@
namespace OCA\News\Tests\Unit\Config;
use OCA\News\Config\Config;
-use PHPUnit_Framework_TestCase;
+use PHPUnit\Framework\TestCase;
-
-class ConfigTest extends PHPUnit_Framework_TestCase
+class ConfigTest extends TestCase
{
private $fileSystem;
diff --git a/tests/Unit/Controller/AdminControllerTest.php b/tests/Unit/Controller/AdminControllerTest.php
index a2b7f304a..486330193 100644
--- a/tests/Unit/Controller/AdminControllerTest.php
+++ b/tests/Unit/Controller/AdminControllerTest.php
@@ -14,8 +14,9 @@
namespace OCA\News\Tests\Unit\Controller;
use OCA\News\Controller\AdminController;
+use PHPUnit\Framework\TestCase;
-class AdminControllerTest extends \PHPUnit_Framework_TestCase
+class AdminControllerTest extends TestCase
{
private $appName;
diff --git a/tests/Unit/Controller/EntityApiSerializerTest.php b/tests/Unit/Controller/EntityApiSerializerTest.php
index 49b7e0b8d..15f11a8b0 100644
--- a/tests/Unit/Controller/EntityApiSerializerTest.php
+++ b/tests/Unit/Controller/EntityApiSerializerTest.php
@@ -18,14 +18,14 @@ use \OCP\AppFramework\Http\Response;
use \OCP\AppFramework\Db\Entity;
use \OCA\News\Db\Item;
+use PHPUnit\Framework\TestCase;
class TestEntity extends Entity
{
}
-
-class EntityApiSerializerTest extends \PHPUnit_Framework_TestCase
+class EntityApiSerializerTest extends TestCase
{
diff --git a/tests/Unit/Controller/ExportControllerTest.php b/tests/Unit/Controller/ExportControllerTest.php
index 592582b3a..7917eee24 100644
--- a/tests/Unit/Controller/ExportControllerTest.php
+++ b/tests/Unit/Controller/ExportControllerTest.php
@@ -21,8 +21,9 @@ use \OCA\News\Utility\OPMLExporter;
use \OCA\News\Db\Item;
use \OCA\News\Db\Feed;
+use PHPUnit\Framework\TestCase;
-class ExportControllerTest extends \PHPUnit_Framework_TestCase
+class ExportControllerTest extends TestCase
{
private $appName;
diff --git a/tests/Unit/Controller/FeedApiControllerTest.php b/tests/Unit/Controller/FeedApiControllerTest.php
index 9217014d4..ef61d1969 100644
--- a/tests/Unit/Controller/FeedApiControllerTest.php
+++ b/tests/Unit/Controller/FeedApiControllerTest.php
@@ -24,8 +24,9 @@ use \OCA\News\Db\Folder;
use \OCA\News\Db\Feed;
use \OCA\News\Db\Item;
+use PHPUnit\Framework\TestCase;
-class FeedApiControllerTest extends \PHPUnit_Framework_TestCase
+class FeedApiControllerTest extends TestCase
{
private $feedService;
diff --git a/tests/Unit/Controller/FeedControllerTest.php b/tests/Unit/Controller/FeedControllerTest.php
index 8bff9b2eb..7580920d3 100644
--- a/tests/Unit/Controller/FeedControllerTest.php
+++ b/tests/Unit/Controller/FeedControllerTest.php
@@ -21,8 +21,9 @@ use OCA\News\Db\FeedType;
use OCA\News\Service\ServiceNotFoundException;
use OCA\News\Service\ServiceConflictException;
+use PHPUnit\Framework\TestCase;
-class FeedControllerTest extends \PHPUnit_Framework_TestCase
+class FeedControllerTest extends TestCase
{
private $appName;
diff --git a/tests/Unit/Controller/FolderApiControllerTest.php b/tests/Unit/Controller/FolderApiControllerTest.php
index 1a3816b7b..d8035d902 100644
--- a/tests/Unit/Controller/FolderApiControllerTest.php
+++ b/tests/Unit/Controller/FolderApiControllerTest.php
@@ -27,8 +27,10 @@ use \OCA\News\Db\Folder;
use \OCA\News\Db\Feed;
use \OCA\News\Db\Item;
+use PHPUnit\Framework\TestCase;
-class FolderApiControllerTest extends \PHPUnit_Framework_TestCase
+
+class FolderApiControllerTest extends TestCase
{
private $folderService;
diff --git a/tests/Unit/Controller/FolderControllerTest.php b/tests/Unit/Controller/FolderControllerTest.php
index ba69fcac7..98b96c5c3 100644
--- a/tests/Unit/Controller/FolderControllerTest.php
+++ b/tests/Unit/Controller/FolderControllerTest.php
@@ -22,8 +22,10 @@ use \OCA\News\Service\ServiceNotFoundException;
use \OCA\News\Service\ServiceConflictException;
use \OCA\News\Service\ServiceValidationException;
+use PHPUnit\Framework\TestCase;
-class FolderControllerTest extends \PHPUnit_Framework_TestCase
+
+class FolderControllerTest extends TestCase
{
private $appName;
diff --git a/tests/Unit/Controller/ItemApiControllerTest.php b/tests/Unit/Controller/ItemApiControllerTest.php
index ad2b323e7..916b85a36 100644
--- a/tests/Unit/Controller/ItemApiControllerTest.php
+++ b/tests/Unit/Controller/ItemApiControllerTest.php
@@ -21,8 +21,10 @@ use \OCP\AppFramework\Http;
use \OCA\News\Service\ServiceNotFoundException;
use \OCA\News\Db\Item;
+use PHPUnit\Framework\TestCase;
-class ItemApiControllerTest extends \PHPUnit_Framework_TestCase
+
+class ItemApiControllerTest extends TestCase
{
private $itemService;
diff --git a/tests/Unit/Controller/ItemControllerTest.php b/tests/Unit/Controller/ItemControllerTest.php
index d99b9be21..0093083f4 100644
--- a/tests/Unit/Controller/ItemControllerTest.php
+++ b/tests/Unit/Controller/ItemControllerTest.php
@@ -21,8 +21,10 @@ use \OCA\News\Db\Feed;
use \OCA\News\Db\FeedType;
use \OCA\News\Service\ServiceNotFoundException;
+use PHPUnit\Framework\TestCase;
-class ItemControllerTest extends \PHPUnit_Framework_TestCase
+
+class ItemControllerTest extends TestCase
{
private $appName;
diff --git a/tests/Unit/Controller/JSONHttpErrorTest.php b/tests/Unit/Controller/JSONHttpErrorTest.php
index a77566e04..bf043bf54 100644
--- a/tests/Unit/Controller/JSONHttpErrorTest.php
+++ b/tests/Unit/Controller/JSONHttpErrorTest.php
@@ -15,12 +15,14 @@ namespace OCA\News\Tests\Unit\Controller;
use OCA\News\Controller\JSONHttpError;
+use PHPUnit\Framework\TestCase;
+
class Test
{
use JSONHttpError;
}
-class JSONHttpErrorTest extends \PHPUnit_Framework_TestCase
+class JSONHttpErrorTest extends TestCase
{
diff --git a/tests/Unit/Controller/PageControllerTest.php b/tests/Unit/Controller/PageControllerTest.php
index b90c200d4..84671ea6d 100644
--- a/tests/Unit/Controller/PageControllerTest.php
+++ b/tests/Unit/Controller/PageControllerTest.php
@@ -15,9 +15,10 @@ namespace OCA\News\Tests\Unit\Controller;
use OCA\News\Controller\PageController;
use \OCA\News\Db\FeedType;
+use PHPUnit\Framework\TestCase;
-class PageControllerTest extends \PHPUnit_Framework_TestCase
+class PageControllerTest extends TestCase
{
private $settings;
diff --git a/tests/Unit/Controller/UserApiControllerTest.php b/tests/Unit/Controller/UserApiControllerTest.php
index e2868ebe1..d562329f3 100644
--- a/tests/Unit/Controller/UserApiControllerTest.php
+++ b/tests/Unit/Controller/UserApiControllerTest.php
@@ -15,7 +15,9 @@ namespace OCA\News\Tests\Unit\Controller;
use OCA\News\Controller\UserApiController;
-class UserApiControllerTest extends \PHPUnit_Framework_TestCase
+use PHPUnit\Framework\TestCase;
+
+class UserApiControllerTest extends TestCase
{
private $request;
diff --git a/tests/Unit/Controller/UtilityApiControllerTest.php b/tests/Unit/Controller/UtilityApiControllerTest.php
index 172932b0e..8ae25a43d 100644
--- a/tests/Unit/Controller/UtilityApiControllerTest.php
+++ b/tests/Unit/Controller/UtilityApiControllerTest.php
@@ -17,7 +17,9 @@ namespace OCA\News\Tests\Unit\Controller;
use OCA\News\Controller\UtilityApiController;
-class UtilityApiControllerTest extends \PHPUnit_Framework_TestCase
+use PHPUnit\Framework\TestCase;
+
+class UtilityApiControllerTest extends TestCase
{
private $settings;
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;
diff --git a/tests/Unit/Fetcher/FeedFetcherTest.php b/tests/Unit/Fetcher/FeedFetcherTest.php
index 500463e01..50fd4d6d6 100644
--- a/tests/Unit/Fetcher/FeedFetcherTest.php
+++ b/tests/Unit/Fetcher/FeedFetcherTest.php
@@ -18,9 +18,10 @@ use \OCA\News\Db\Feed;
use OCA\News\Fetcher\FeedFetcher;
use OCP\Http\Client\IClientService;
use PicoFeed\Processor\ItemPostProcessor;
+use PHPUnit\Framework\TestCase;
-class FeedFetcherTest extends \PHPUnit_Framework_TestCase
+class FeedFetcherTest extends TestCase
{
private $fetcher;
diff --git a/tests/Unit/Fetcher/FetcherTest.php b/tests/Unit/Fetcher/FetcherTest.php
index 971e35890..5ff800b21 100644
--- a/tests/Unit/Fetcher/FetcherTest.php
+++ b/tests/Unit/Fetcher/FetcherTest.php
@@ -26,8 +26,9 @@ namespace OCA\News\Tests\Unit\Fetcher;
use OCA\News\Fetcher\Fetcher;
+use PHPUnit\Framework\TestCase;
-class FetcherTest extends \PHPUnit_Framework_TestCase
+class FetcherTest extends TestCase
{
private $fetcher;
diff --git a/tests/Unit/Fetcher/YoutubeFetcherTest.php b/tests/Unit/Fetcher/YoutubeFetcherTest.php
index 28ddc2dc1..fbfd04c02 100644
--- a/tests/Unit/Fetcher/YoutubeFetcherTest.php
+++ b/tests/Unit/Fetcher/YoutubeFetcherTest.php
@@ -14,8 +14,9 @@ namespace OCA\News\Tests\Unit\Fetcher;
use \OCA\News\Db\Feed;
use OCA\News\Fetcher\YoutubeFetcher;
+use PHPUnit\Framework\TestCase;
-class YoutubeFetcherTest extends \PHPUnit_Framework_TestCase
+class YoutubeFetcherTest extends TestCase
{
private $fetcher;
diff --git a/tests/Unit/Http/TextDownloadResponseTest.php b/tests/Unit/Http/TextDownloadResponseTest.php
index 96fa74ffc..4021d22aa 100644
--- a/tests/Unit/Http/TextDownloadResponseTest.php
+++ b/tests/Unit/Http/TextDownloadResponseTest.php
@@ -16,8 +16,9 @@ namespace OCA\News\Tests\Unit\Http;
use OCA\News\Http\TextDownloadResponse;
+use PHPUnit\Framework\TestCase;
-class TextDownloadResponseTest extends \PHPUnit_Framework_TestCase
+class TextDownloadResponseTest extends TestCase
{
diff --git a/tests/Unit/Http/TextResponseTest.php b/tests/Unit/Http/TextResponseTest.php
index cd7738de5..5de374a17 100644
--- a/tests/Unit/Http/TextResponseTest.php
+++ b/tests/Unit/Http/TextResponseTest.php
@@ -14,10 +14,10 @@
namespace OCA\News\Tests\Unit\Http;
-
+use PHPUnit\Framework\TestCase;
use OCA\News\Http\TextResponse;
-class TextResponseTest extends \PHPUnit_Framework_Test