diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-06-25 01:18:53 +0200 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-06-25 01:18:53 +0200 |
commit | 5f0fd49ccd396e654a4bee159799f62ac74fd9f4 (patch) | |
tree | e9e0cbb845b6fc61325ca1cd967aa677c79e8156 | |
parent | 311afe02dccf43ac497fb351ff579e6522529922 (diff) |
add phpunit xml
40 files changed, 6 insertions, 89 deletions
@@ -26,6 +26,7 @@ appstore: clean --exclude-vcs \ --exclude=$(project_dir)/build/artifacts \ --exclude=$(project_dir)/js/node_modules \ + --exclude=$(project_dir)/js/phpunit.xml \ --exclude=$(project_dir)/js/.bowerrc \ --exclude=$(project_dir)/js/.jshintrc \ --exclude=$(project_dir)/js/Gruntfile.js \ diff --git a/appinfo/application.php b/appinfo/application.php index c69c2ca5b..d2e846ded 100644 --- a/appinfo/application.php +++ b/appinfo/application.php @@ -34,7 +34,6 @@ use \OCA\News\Service\ItemService; use \OCA\News\Db\FolderMapper; use \OCA\News\Db\FeedMapper; -use \OCA\News\Db\ItemMapper; use \OCA\News\Db\StatusFlag; use \OCA\News\Db\MapperFactory; diff --git a/cron/updater.php b/cron/updater.php index ac314760c..a2a343b6e 100644 --- a/cron/updater.php +++ b/cron/updater.php @@ -22,10 +22,11 @@ class Updater { static public function run() { $app = new Application(); - $container = $app->getContainer(); + + $container = $app->getContainer(); // make it possible to turn off cron updates if you use an external - // script to execute updates in paralell + // script to execute updates in parallel if ($container->query('Config')->getUseCronUpdates()) { $container->query('Updater')->beforeUpdate(); $container->query('Updater')->update(); diff --git a/phpunit.xml b/phpunit.xml new file mode 100644 index 000000000..81da016e9 --- /dev/null +++ b/phpunit.xml @@ -0,0 +1 @@ +<phpunit bootstrap="tests/classloader.php"></phpunit>
\ No newline at end of file diff --git a/tests/unit/articleenhancer/EnhancerTest.php b/tests/unit/articleenhancer/EnhancerTest.php index 4a72e19a8..129b88fd7 100644 --- a/tests/unit/articleenhancer/EnhancerTest.php +++ b/tests/unit/articleenhancer/EnhancerTest.php @@ -15,8 +15,6 @@ namespace OCA\News\ArticleEnhancer; use \OCA\News\Db\Item; -require_once(__DIR__ . "/../../classloader.php"); - class EnhancerTest extends \PHPUnit_Framework_TestCase { diff --git a/tests/unit/articleenhancer/RegexArticleEnhancerTest.php b/tests/unit/articleenhancer/RegexArticleEnhancerTest.php index f464c9275..a08371f47 100644 --- a/tests/unit/articleenhancer/RegexArticleEnhancerTest.php +++ b/tests/unit/articleenhancer/RegexArticleEnhancerTest.php @@ -15,8 +15,6 @@ namespace OCA\News\ArticleEnhancer; use \OCA\News\Db\Item; -require_once(__DIR__ . "/../../classloader.php"); - class RegexArticleEnhancerTest extends \PHPUnit_Framework_TestCase { diff --git a/tests/unit/articleenhancer/XPathArticleEnhancerTest.php b/tests/unit/articleenhancer/XPathArticleEnhancerTest.php index 55493bed7..bc6b737ae 100644 --- a/tests/unit/articleenhancer/XPathArticleEnhancerTest.php +++ b/tests/unit/articleenhancer/XPathArticleEnhancerTest.php @@ -15,8 +15,6 @@ namespace OCA\News\ArticleEnhancer; use \OCA\News\Db\Item; -require_once(__DIR__ . "/../../classloader.php"); - class XPathArticleEnhancerTest extends \PHPUnit_Framework_TestCase { diff --git a/tests/unit/config/AppConfigTest.php b/tests/unit/config/AppConfigTest.php index d785ceea4..470442bc5 100644 --- a/tests/unit/config/AppConfigTest.php +++ b/tests/unit/config/AppConfigTest.php @@ -14,9 +14,6 @@ namespace OCA\News\Config; -require_once(__DIR__ . '/../../classloader.php'); - - class AppConfigTest extends \PHPUnit_Framework_TestCase { private $nav; diff --git a/tests/unit/controller/EntityApiSerializerTest.php b/tests/unit/controller/EntityApiSerializerTest.php index 68675824b..9e77421ce 100644 --- a/tests/unit/controller/EntityApiSerializerTest.php +++ b/tests/unit/controller/EntityApiSerializerTest.php @@ -13,8 +13,6 @@ namespace OCA\News\Controller; -require_once(__DIR__ . "/../../classloader.php"); - use \OCP\AppFramework\Http\Response; diff --git a/tests/unit/controller/ExportControllerTest.php b/tests/unit/controller/ExportControllerTest.php index ded145f2b..28d69c6f3 100644 --- a/tests/unit/controller/ExportControllerTest.php +++ b/tests/unit/controller/ExportControllerTest.php @@ -20,8 +20,6 @@ use \OCA\News\Utility\OPMLExporter; use \OCA\News\Db\Item; use \OCA\News\Db\Feed; -require_once(__DIR__ . "/../../classloader.php"); - class ExportControllerTest extends \PHPUnit_Framework_TestCase { diff --git a/tests/unit/controller/FeedApiControllerTest.php b/tests/unit/controller/FeedApiControllerTest.php index a276512f6..c614dac82 100644 --- a/tests/unit/controller/FeedApiControllerTest.php +++ b/tests/unit/controller/FeedApiControllerTest.php @@ -21,8 +21,6 @@ use \OCA\News\Db\Folder; use \OCA\News\Db\Feed; use \OCA\News\Db\Item; -require_once(__DIR__ . "/../../classloader.php"); - class FeedApiControllerTest extends \PHPUnit_Framework_TestCase { diff --git a/tests/unit/controller/FeedControllerTest.php b/tests/unit/controller/FeedControllerTest.php index fc46594a8..1ed389db3 100644 --- a/tests/unit/controller/FeedControllerTest.php +++ b/tests/unit/controller/FeedControllerTest.php @@ -20,8 +20,6 @@ use \OCA\News\Db\FeedType; use \OCA\News\Service\ServiceNotFoundException; use \OCA\News\Service\ServiceConflictException; -require_once(__DIR__ . "/../../classloader.php"); - class FeedControllerTest extends \PHPUnit_Framework_TestCase { diff --git a/tests/unit/controller/FolderApiControllerTest.php b/tests/unit/controller/FolderApiControllerTest.php index a2e3a4c6f..22e038e16 100644 --- a/tests/unit/controller/FolderApiControllerTest.php +++ b/tests/unit/controller/FolderApiControllerTest.php @@ -24,8 +24,6 @@ use \OCA\News\Db\Folder; use \OCA\News\Db\Feed; use \OCA\News\Db\Item; -require_once(__DIR__ . "/../../classloader.php"); - class FolderApiControllerTest extends \PHPUnit_Framework_TestCase { diff --git a/tests/unit/controller/FolderControllerTest.php b/tests/unit/controller/FolderControllerTest.php index 20ab26341..9ff293b2a 100644 --- a/tests/unit/controller/FolderControllerTest.php +++ b/tests/unit/controller/FolderControllerTest.php @@ -21,8 +21,6 @@ use \OCA\News\Service\ServiceNotFoundException; use \OCA\News\Service\ServiceConflictException; use \OCA\News\Service\ServiceValidationException; -require_once(__DIR__ . "/../../classloader.php"); - class FolderControllerTest extends \PHPUnit_Framework_TestCase { diff --git a/tests/unit/controller/ItemApiControllerTest.php b/tests/unit/controller/ItemApiControllerTest.php index e1e91b424..f2bbd92b6 100644 --- a/tests/unit/controller/ItemApiControllerTest.php +++ b/tests/unit/controller/ItemApiControllerTest.php @@ -18,8 +18,6 @@ use \OCP\AppFramework\Http; use \OCA\News\Service\ServiceNotFoundException; use \OCA\News\Db\Item; -require_once(__DIR__ . "/../../classloader.php"); - class ItemApiControllerTest extends \PHPUnit_Framework_TestCase { diff --git a/tests/unit/controller/ItemControllerTest.php b/tests/unit/controller/ItemControllerTest.php index 59bb7681b..b5a579783 100644 --- a/tests/unit/controller/ItemControllerTest.php +++ b/tests/unit/controller/ItemControllerTest.php @@ -20,8 +20,6 @@ use \OCA\News\Db\Feed; use \OCA\News\Db\FeedType; use \OCA\News\Service\ServiceNotFoundException; -require_once(__DIR__ . "/../../classloader.php"); - class ItemControllerTest extends \PHPUnit_Framework_TestCase { diff --git a/tests/unit/controller/JSONHttpErrorTest.php b/tests/unit/controller/JSONHttpErrorTest.php index ffbbbed43..8ab657aa9 100644 --- a/tests/unit/controller/JSONHttpErrorTest.php +++ b/tests/unit/controller/JSONHttpErrorTest.php @@ -13,7 +13,6 @@ namespace OCA\News\Controller; -require_once(__DIR__ . "/../../classloader.php"); class Test { use JSONHttpError; diff --git a/tests/unit/controller/PageControllerTest.php b/tests/unit/controller/PageControllerTest.php index 0e0959ea7..fbb44dc67 100644 --- a/tests/unit/controller/PageControllerTest.php +++ b/tests/unit/controller/PageControllerTest.php @@ -14,9 +14,6 @@ namespace OCA\News\Controller; -require_once(__DIR__ . "/../../classloader.php"); - - class PageControllerTest extends \PHPUnit_Framework_TestCase { private $settings; diff --git a/tests/unit/controller/UtilityApiControllerTest.php b/tests/unit/controller/UtilityApiControllerTest.php index 4c0107c91..d9c298858 100644 --- a/tests/unit/controller/UtilityApiControllerTest.php +++ b/tests/unit/controller/UtilityApiControllerTest.php @@ -13,8 +13,6 @@ namespace OCA\News\Controller; -require_once(__DIR__ . "/../../classloader.php"); - class UtilityApiControllerTest extends \PHPUnit_Framework_TestCase { diff --git a/tests/unit/db/FeedMapperTest.php b/tests/unit/db/FeedMapperTest.php index c3b276ba6..83dcc40ef 100644 --- a/tests/unit/db/FeedMapperTest.php +++ b/tests/unit/db/FeedMapperTest.php @@ -13,8 +13,6 @@ namespace OCA\News\Db; -require_once(__DIR__ . "/../../classloader.php"); - class FeedMapperTest extends \OCP\AppFramework\Db\MapperTestUtility { diff --git a/tests/unit/db/FeedTest.php b/tests/unit/db/FeedTest.php index 6ebe27732..60fbeacc6 100644 --- a/tests/unit/db/FeedTest.php +++ b/tests/unit/db/FeedTest.php @@ -13,8 +13,6 @@ namespace OCA\News\Db; -require_once(__DIR__ . "/../../classloader.php"); - class FeedTest extends \PHPUnit_Framework_TestCase { diff --git a/tests/unit/db/FolderMapperTest.php b/tests/unit/db/FolderMapperTest.php index 192b303c9..b9196ef6b 100644 --- a/tests/unit/db/FolderMapperTest.php +++ b/tests/unit/db/FolderMapperTest.php @@ -13,8 +13,6 @@ namespace OCA\News\Db; -require_once(__DIR__ . "/../../classloader.php"); - class FolderMapperTest extends \OCP\AppFramework\Db\MapperTestUtility { diff --git a/tests/unit/db/FolderTest.php b/tests/unit/db/FolderTest.php index e2726e556..026d1cf03 100644 --- a/tests/unit/db/FolderTest.php +++ b/tests/unit/db/FolderTest.php @@ -13,8 +13,6 @@ namespace OCA\News\Db; -require_once(__DIR__ . "/../../classloader.php"); - class FolderTest extends \PHPUnit_Framework_TestCase { diff --git a/tests/unit/db/ItemMapperTest.php b/tests/unit/db/ItemMapperTest.php index a0ea3bae3..b9feba977 100644 --- a/tests/unit/db/ItemMapperTest.php +++ b/tests/unit/db/ItemMapperTest.php @@ -13,8 +13,6 @@ namespace OCA\News\Db; -require_once(__DIR__ . "/../../classloader.php"); - class ItemMapperTest extends \OCP\AppFramework\Db\MapperTestUtility { diff --git a/tests/unit/db/ItemTest.php b/tests/unit/db/ItemTest.php index 65fb0cd52..23deb4c14 100644 --- a/tests/unit/db/ItemTest.php +++ b/tests/unit/db/ItemTest.php @@ -13,8 +13,6 @@ namespace OCA\News\Db; -require_once(__DIR__ . "/../../classloader.php"); - class ItemTest extends \PHPUnit_Framework_TestCase { diff --git a/tests/unit/db/MapperFactoryTest.php b/tests/unit/db/MapperFactoryTest.php index c1acd0dbc..d96c9d857 100644 --- a/tests/unit/db/MapperFactoryTest.php +++ b/tests/unit/db/MapperFactoryTest.php @@ -13,9 +13,6 @@ namespace OCA\News\Db; -require_once(__DIR__ . "/../../classloader.php"); - - class MapperFactoryTest extends \PHPUnit_Framework_TestCase { diff --git a/tests/unit/db/postgres/ItemMapperTest.php b/tests/unit/db/postgres/ItemMapperTest.php index 419e8e5f6..d7c684c14 100644 --- a/tests/unit/db/postgres/ItemMapperTest.php +++ b/tests/unit/db/postgres/ItemMapperTest.php @@ -17,9 +17,6 @@ use \OCA\News\Db\Item; use \OCA\News\Db\StatusFlag; -require_once(__DIR__ . "/../../../classloader.php"); - - class ItemMapperTest extends \OCP\AppFramework\Db\MapperTestUtility { private $mapper; diff --git a/tests/unit/fetcher/FeedFetcherTest.php b/tests/unit/fetcher/FeedFetcherTest.php index 1f1a3cce9..d5e225d76 100644 --- a/tests/unit/fetcher/FeedFetcherTest.php +++ b/tests/unit/fetcher/FeedFetcherTest.php @@ -16,8 +16,6 @@ namespace OCA\News\Fetcher; use \OCA\News\Db\Item; use \OCA\News\Db\Feed; -require_once(__DIR__ . "/../../classloader.php"); - class FeedFetcherTest extends \PHPUnit_Framework_TestCase { diff --git a/tests/unit/fetcher/FetcherTest.php b/tests/unit/fetcher/FetcherTest.php index cc08b2f0f..261c53108 100644 --- a/tests/unit/fetcher/FetcherTest.php +++ b/tests/unit/fetcher/FetcherTest.php @@ -25,8 +25,6 @@ namespace OCA\News\Fetcher; -require_once(__DIR__ . "/../../classloader.php"); - class FetcherTest extends \PHPUnit_Framework_TestCase { diff --git a/tests/unit/http/TextDownloadResponseTest.php b/tests/unit/http/TextDownloadResponseTest.php index f3dd08181..47ee657cd 100644 --- a/tests/unit/http/TextDownloadResponseTest.php +++ b/tests/unit/http/TextDownloadResponseTest.php @@ -15,9 +15,6 @@ namespace OCA\News\Http; -require_once(__DIR__ . "/../../classloader.php"); - - class TextDownloadResponseTest extends \PHPUnit_Framework_TestCase { diff --git a/tests/unit/http/TextResponseTest.php b/tests/unit/http/TextResponseTest.php index 01241065f..c0b5ca3a0 100644 --- a/tests/unit/http/TextResponseTest.php +++ b/tests/unit/http/TextResponseTest.php @@ -15,9 +15,6 @@ namespace OCA\News\Http; -require_once(__DIR__ . "/../../classloader.php"); - - class TextResponseTest extends \PHPUnit_Framework_TestCase { diff --git a/tests/unit/service/FeedServiceTest.php b/tests/unit/service/FeedServiceTest.php index 2ec1d7a9b..a4e722109 100644 --- a/tests/unit/service/FeedServiceTest.php +++ b/tests/unit/service/FeedServiceTest.php @@ -14,8 +14,6 @@ namespace OCA\News\Service; -require_once(__DIR__ . "/../../classloader.php"); - use \OCP\AppFramework\Db\DoesNotExistException; use \OCA\News\Db\Feed; @@ -23,6 +21,7 @@ use \OCA\News\Db\Item; use \OCA\News\Fetcher\Fetcher; use \OCA\News\Fetcher\FetcherException; + class FeedServiceTest extends \PHPUnit_Framework_TestCase { private $feedMapper; diff --git a/tests/unit/service/FolderServiceTest.php b/tests/unit/service/FolderServiceTest.php index 2fd718616..144705b26 100644 --- a/tests/unit/service/FolderServiceTest.php +++ b/tests/unit/service/FolderServiceTest.php @@ -13,9 +13,6 @@ namespace OCA\News\Service; -require_once(__DIR__ . "/../../classloader.php"); - - use \OCA\News\Db\Folder; diff --git a/tests/unit/service/ItemServiceTest.php b/tests/unit/service/ItemServiceTest.php index 81cbf1bff..557d31816 100644 --- a/tests/unit/service/ItemServiceTest.php +++ b/tests/unit/service/ItemServiceTest.php @@ -13,8 +13,6 @@ namespace OCA\News\Service; -require_once(__DIR__ . "/../../classloader.php"); - use \OCP\AppFramework\Db\DoesNotExistException; use \OCA\News\Db\Item; diff --git a/tests/unit/service/ServiceTest.php b/tests/unit/service/ServiceTest.php index 88c57abbf..369962128 100644 --- a/tests/unit/service/ServiceTest.php +++ b/tests/unit/service/ServiceTest.php @@ -13,9 +13,6 @@ namespace OCA\News\Service; -require_once(__DIR__ . "/../../classloader.php"); - - use \OCP\AppFramework\Db\DoesNotExistException; use \OCP\AppFramework\Db\MultipleObjectsReturnedException; diff --git a/tests/unit/service/StatusFlagTest.php b/tests/unit/service/StatusFlagTest.php index 2e295b3d4..372fdbd88 100644 --- a/tests/unit/service/StatusFlagTest.php +++ b/tests/unit/service/StatusFlagTest.php @@ -14,9 +14,6 @@ namespace OCA\News\Db; -require_once(__DIR__ . "/../../classloader.php"); - - class StatusFlagTest extends \PHPUnit_Framework_TestCase { private $statusFlag; diff --git a/tests/unit/utility/ConfigTest.php b/tests/unit/utility/ConfigTest.php index 8a3173732..578949b4e 100644 --- a/tests/unit/utility/ConfigTest.php +++ b/tests/unit/utility/ConfigTest.php @@ -13,8 +13,6 @@ namespace OCA\News\Utility; -require_once(__DIR__ . "/../../classloader.php"); - class ConfigTest extends \PHPUnit_Framework_TestCase { diff --git a/tests/unit/utility/FaviconFetcherTest.php b/tests/unit/utility/FaviconFetcherTest.php index 777b552b3..b7499fd36 100644 --- a/tests/unit/utility/FaviconFetcherTest.php +++ b/tests/unit/utility/FaviconFetcherTest.php @@ -15,9 +15,6 @@ namespace OCA\News\Utility; -require_once(__DIR__ . "/../../classloader.php"); - - class FaviconFetcherTest extends \PHPUnit_Framework_TestCase { private $fetcher; diff --git a/tests/unit/utility/OPMLExporterTest.php b/tests/unit/utility/OPMLExporterTest.php index 1ff812aa7..1b8e76ca4 100644 --- a/tests/unit/utility/OPMLExporterTest.php +++ b/ |