summaryrefslogtreecommitdiffstats
path: root/tests/Integration/Fixtures
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Integration/Fixtures')
-rw-r--r--tests/Integration/Fixtures/FeedFixture.php47
-rw-r--r--tests/Integration/Fixtures/Fixture.php3
-rw-r--r--tests/Integration/Fixtures/FolderFixture.php20
-rw-r--r--tests/Integration/Fixtures/ItemFixture.php35
4 files changed, 54 insertions, 51 deletions
diff --git a/tests/Integration/Fixtures/FeedFixture.php b/tests/Integration/Fixtures/FeedFixture.php
index 77abd3ee0..0c1e31af9 100644
--- a/tests/Integration/Fixtures/FeedFixture.php
+++ b/tests/Integration/Fixtures/FeedFixture.php
@@ -12,7 +12,6 @@
namespace OCA\News\Tests\Integration\Fixtures;
-
use OCA\News\Db\Feed;
class FeedFixture extends Feed
@@ -20,31 +19,33 @@ class FeedFixture extends Feed
use Fixture;
- public function __construct(array $defaults=[])
+ 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' => null,
- '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
+ 'userId' => 'test',
+ 'urlHash' => 'urlHash',
+ 'url' => 'http://the.url.com',
+ 'title' => 'title',
+ 'faviconLink' => 'http://feed.com/favicon.ico',
+ 'added' => 3000,
+ 'folderId' => null,
+ '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
index 1874c8102..366c93228 100644
--- a/tests/Integration/Fixtures/Fixture.php
+++ b/tests/Integration/Fixtures/Fixture.php
@@ -15,8 +15,7 @@ namespace OCA\News\Tests\Integration\Fixtures;
trait Fixture
{
-
- protected function fillDefaults(array $defaults=[])
+ protected function fillDefaults(array $defaults = [])
{
foreach ($defaults as $key => $value) {
$method = 'set' . ucfirst($key);
diff --git a/tests/Integration/Fixtures/FolderFixture.php b/tests/Integration/Fixtures/FolderFixture.php
index 09c03e5de..ffd6042c0 100644
--- a/tests/Integration/Fixtures/FolderFixture.php
+++ b/tests/Integration/Fixtures/FolderFixture.php
@@ -12,24 +12,26 @@
namespace OCA\News\Tests\Integration\Fixtures;
-
use OCA\News\Db\Folder;
class FolderFixture extends Folder
{
use Fixture;
- public function __construct(array $defaults=[])
+ public function __construct(array $defaults = [])
{
+ parent::__construct();
+
$defaults = array_merge(
[
- 'parentId' => null,
- 'name' => 'folder',
- 'userId' => 'test',
- 'opened' => true,
- 'deletedAt' => 0,
- 'lastModified' => 9
- ], $defaults
+ 'parentId' => null,
+ 'name' => 'folder',
+ 'userId' => 'test',
+ 'opened' => true,
+ 'deletedAt' => 0,
+ 'lastModified' => 9
+ ],
+ $defaults
);
unset($defaults['feeds']);
$this->fillDefaults($defaults);
diff --git a/tests/Integration/Fixtures/ItemFixture.php b/tests/Integration/Fixtures/ItemFixture.php
index e84b4250b..978b12b55 100644
--- a/tests/Integration/Fixtures/ItemFixture.php
+++ b/tests/Integration/Fixtures/ItemFixture.php
@@ -12,32 +12,33 @@
namespace OCA\News\Tests\Integration\Fixtures;
-
use OCA\News\Db\Item;
class ItemFixture extends Item
{
use Fixture;
- public function __construct(array $defaults=[])
+ 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',
- 'mediaThumbnail' => 'https://i3.ytimg.com/vi/Zgge1O9wdPY/hqdefault.jpg',
- 'mediaDescription' => 'The best video ever',
- 'feedId' => 0,
- 'unread' => true,
- 'starred' => false,
- 'lastModified' => 113,
- 'rtl' => false,
- ], $defaults
+ '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',
+ 'mediaThumbnail' => 'https://i3.ytimg.com/vi/Zgge1O9wdPY/hqdefault.jpg',
+ 'mediaDescription' => 'The best video ever',
+ 'feedId' => 0,
+ 'unread' => true,
+ 'starred' => false,
+ 'lastModified' => 113,
+ 'rtl' => false,
+ ],
+ $defaults
);
if (!array_key_exists('guid', $defaults)) {