summaryrefslogtreecommitdiffstats
path: root/tests/integration/fixtures
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2016-07-23 21:24:54 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2016-07-23 21:24:54 +0200
commit004fcbbcc7609ca83807f2e38967ef54f469bf72 (patch)
tree49eb99b4ea92b2045793fc567f719b31ec7f9042 /tests/integration/fixtures
parent60abc0ed4438c9b6fda245b0dc33cb483bc2aeaf (diff)
Move to new directory structure
Diffstat (limited to 'tests/integration/fixtures')
-rw-r--r--tests/integration/fixtures/data/default.php76
-rw-r--r--tests/integration/fixtures/data/readitem.php33
-rw-r--r--tests/integration/fixtures/feedfixture.php50
-rw-r--r--tests/integration/fixtures/fixture.php25
-rw-r--r--tests/integration/fixtures/folderfixture.php35
-rw-r--r--tests/integration/fixtures/itemfixture.php49
6 files changed, 0 insertions, 268 deletions
diff --git a/tests/integration/fixtures/data/default.php b/tests/integration/fixtures/data/default.php
deleted file mode 100644
index d1383c3f7..000000000
--- a/tests/integration/fixtures/data/default.php
+++ /dev/null
@@ -1,76 +0,0 @@
-<?php
-/**
- * ownCloud - News
- *
- * This file is licensed under the Affero General Public License version 3 or
- * later. See the COPYING file.
- *
- * @author Bernhard Posselt <dev@bernhard-posselt.com>
- * @copyright Bernhard Posselt 2015
- */
-
-return [
- 'folders' => [
- [
- 'name' => 'first folder',
- 'feeds' => [
- [
- 'title' => 'first feed',
- 'url' => 'http://google.de',
- 'articlesPerUpdate' => 1,
- 'items' => [
- ['title' => 'a title1', 'guid' => 'abc'],
- ['title' => 'a title2', 'status' => 4, 'guid' => 'def'],
- ['title' => 'a title3', 'status' => 6, 'guid' => 'gih'],
- ['title' => 'del1', 'status' => 0],
- ['title' => 'del2', 'status' => 0],
- ['title' => 'del3', 'status' => 0],
- ['title' => 'del4', 'status' => 0]
- ]
- ],
- [
- 'title' => 'second feed',
- 'url' => 'http://golem.de',
- 'items' => []
- ],
- ],
- ],
- [
- 'name' => 'second folder',
- 'opened' => false,
- 'feeds' => [
- [
- 'title' => 'third feed',
- 'url' => 'http://heise.de',
- 'items' => [['title' => 'a title9']]
- ],
- [
- 'title' => 'sixth feed',
- 'url' => 'http://gremlins.de',
- 'deletedAt' => 999999999,
- 'items' => [['title' => 'not found feed', 'guid' => 'not found']]
- ]
- ],
- ],
- [
- 'name' => 'third folder',
- 'deletedAt' => 9999999999,
- 'feeds' => [
- [
- 'title' => 'fifth feed',
- 'url' => 'http://prolinux.de',
- 'items' => [['title' => 'not found folder', 'guid' => 'not found']]
- ]
- ],
- ]
- ],
- 'feeds' => [
- [
- 'title' => 'fourth feed',
- 'url' => 'http://blog.fefe.de',
- 'items' => [
- ['title' => 'no folder', 'status' => 0]
- ]
- ]
- ]
-]; \ No newline at end of file
diff --git a/tests/integration/fixtures/data/readitem.php b/tests/integration/fixtures/data/readitem.php
deleted file mode 100644
index 7e3d68fad..000000000
--- a/tests/integration/fixtures/data/readitem.php
+++ /dev/null
@@ -1,33 +0,0 @@
-<?php
-/**
- * ownCloud - News
- *
- * This file is licensed under the Affero General Public License version 3 or
- * later. See the COPYING file.
- *
- * @author Bernhard Posselt <dev@bernhard-posselt.com>
- * @copyright Bernhard Posselt 2015
- */
-
-return [
- 'feeds' => [
- [
- 'title' => 'john feed',
- 'userId' => 'john',
- 'items' => [
- ['title' => 'blubb', 'status' => 2],
- ['title' => 'blubb', 'status' => 2]
- ]
- ],
- [
- 'title' => 'test feed',
- 'userId' => 'test',
- 'items' => [
- ['title' => 'blubb', 'status' => 2],
- ['title' => 'blubbs', 'status' => 2],
- ['title' => 'blubb', 'status' => 2],
- ['title' => 'blubb', 'status' => 2]
- ]
- ]
- ]
-];
diff --git a/tests/integration/fixtures/feedfixture.php b/tests/integration/fixtures/feedfixture.php
deleted file mode 100644
index eafcab906..000000000
--- a/tests/integration/fixtures/feedfixture.php
+++ /dev/null
@@ -1,50 +0,0 @@
-<?php
-/**
- * ownCloud - News
- *
- * This file is licensed under the Affero General Public License version 3 or
- * later. See the COPYING file.
- *
- * @author Bernhard Posselt <dev@bernhard-posselt.com>
- * @copyright Bernhard Posselt 2015
- */
-
-
-namespace OCA\News\Tests\Integration\Fixtures;
-
-
-use OCA\News\Db\Feed;
-
-class FeedFixture extends Feed {
-
- use Fixture;
-
- public function __construct(array $defaults=[]) {
- parent::__construct();
- $defaults = array_merge([
- 'userId' => 'test',
- 'urlHash' => 'urlHash',
- 'url' => 'http://the.url.com',
- 'title' => 'title',
- 'faviconLink' => 'http://feed.com/favicon.ico',
- 'added' => 3000,
- 'folderId' => 0,
- 'link' => 'http://feed.com/rss',
- 'preventUpdate' => false,
- 'deletedAt' => 0,
- 'articlesPerUpdate' => 40,
- 'httpLastModified' => 10,
- 'httpEtag' => '',
- 'location' => 'http://feed.com/rss',
- 'ordering' => 0,
- 'fullTextEnabled' => false,
- 'pinned' => false,
- 'updateMode' => 0,
- 'updateErrorCount' => 0,
- 'lastUpdateError' => '',
- ], $defaults);
- unset($defaults['items']);
- $this->fillDefaults($defaults);
- }
-
-}
diff --git a/tests/integration/fixtures/fixture.php b/tests/integration/fixtures/fixture.php
deleted file mode 100644
index a5bceda17..000000000
--- a/tests/integration/fixtures/fixture.php
+++ /dev/null
@@ -1,25 +0,0 @@
-<?php
-/**
- * ownCloud - News
- *
- * This file is licensed under the Affero General Public License version 3 or
- * later. See the COPYING file.
- *
- * @author Bernhard Posselt <dev@bernhard-posselt.com>
- * @copyright Bernhard Posselt 2015
- */
-
-
-namespace OCA\News\Tests\Integration\Fixtures;
-
-
-trait Fixture {
-
- protected function fillDefaults(array $defaults=[]) {
- foreach ($defaults as $key => $value) {
- $method = 'set' . ucfirst($key);
- $this->$method($value);
- }
- }
-
-} \ No newline at end of file
diff --git a/tests/integration/fixtures/folderfixture.php b/tests/integration/fixtures/folderfixture.php
deleted file mode 100644
index 2dc6b3a44..000000000
--- a/tests/integration/fixtures/folderfixture.php
+++ /dev/null
@@ -1,35 +0,0 @@
-<?php
-/**
- * ownCloud - News
- *
- * This file is licensed under the Affero General Public License version 3 or
- * later. See the COPYING file.
- *
- * @author Bernhard Posselt <dev@bernhard-posselt.com>
- * @copyright Bernhard Posselt 2015
- */
-
-
-namespace OCA\News\Tests\Integration\Fixtures;
-
-
-use OCA\News\Db\Folder;
-
-class FolderFixture extends Folder {
- use Fixture;
-
- public function __construct(array $defaults=[]) {
- parent::__construct();
- $defaults = array_merge([
- 'parentId' => 0,
- 'name' => 'folder',
- 'userId' => 'test',
- 'opened' => true,
- 'deletedAt' => 0,
- 'lastModified' => 9
- ], $defaults);
- unset($defaults['feeds']);
- $this->fillDefaults($defaults);
- }
-
-} \ No newline at end of file
diff --git a/tests/integration/fixtures/itemfixture.php b/tests/integration/fixtures/itemfixture.php
deleted file mode 100644
index 9e6e07fe2..000000000
--- a/tests/integration/fixtures/itemfixture.php
+++ /dev/null
@@ -1,49 +0,0 @@
-<?php
-/**
- * ownCloud - News
- *
- * This file is licensed under the Affero General Public License version 3 or
- * later. See the COPYING file.
- *
- * @author Bernhard Posselt <dev@bernhard-posselt.com>
- * @copyright Bernhard Posselt 2015
- */
-
-
-namespace OCA\News\Tests\Integration\Fixtures;
-
-
-use OCA\News\Db\Item;
-
-class ItemFixture extends Item {
- use Fixture;
-
- public function __construct(array $defaults=[]) {
- parent::__construct();
- $defaults = array_merge([
- 'url' => 'http://google.de',
- 'title' => 'title',
- 'author' => 'my author',
- 'pubDate' => 2323,
- 'body' => 'this is a body',
- 'enclosureMime' => 'video/mpeg',
- 'enclosureLink' => 'http://google.de/web.webm',
- 'feedId' => 0,
- 'status' => 2,
- 'lastModified' => 113,
- 'rtl' => false,
- ], $defaults);
-
- if (!array_key_exists('guid', $defaults)) {
- $defaults['guid'] = $defaults['title'];
- }
-
- if (!array_key_exists('guidHash', $defaults)) {
- $defaults['guidHash'] = $defaults['guid'];
- }
-
- $this->fillDefaults($defaults);
- $this->generateSearchIndex();
- }
-
-}