diff options
Diffstat (limited to 'tests/Integration/Fixtures')
-rw-r--r-- | tests/Integration/Fixtures/FeedFixture.php | 14 | ||||
-rw-r--r-- | tests/Integration/Fixtures/Fixture.php | 8 | ||||
-rw-r--r-- | tests/Integration/Fixtures/FolderFixture.php | 14 | ||||
-rw-r--r-- | tests/Integration/Fixtures/ItemFixture.php | 14 | ||||
-rw-r--r-- | tests/Integration/Fixtures/data/default.php | 2 | ||||
-rw-r--r-- | tests/Integration/Fixtures/data/readitem.php | 2 |
6 files changed, 34 insertions, 20 deletions
diff --git a/tests/Integration/Fixtures/FeedFixture.php b/tests/Integration/Fixtures/FeedFixture.php index 3d7617a57..66461adbc 100644 --- a/tests/Integration/Fixtures/FeedFixture.php +++ b/tests/Integration/Fixtures/FeedFixture.php @@ -5,7 +5,7 @@ * 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> + * @author Bernhard Posselt <dev@bernhard-posselt.com> * @copyright Bernhard Posselt 2015 */ @@ -15,13 +15,16 @@ namespace OCA\News\Tests\Integration\Fixtures; use OCA\News\Db\Feed; -class FeedFixture extends Feed { +class FeedFixture extends Feed +{ use Fixture; - public function __construct(array $defaults=[]) { + public function __construct(array $defaults=[]) + { parent::__construct(); - $defaults = array_merge([ + $defaults = array_merge( + [ 'userId' => 'test', 'urlHash' => 'urlHash', 'url' => 'http://the.url.com', @@ -42,7 +45,8 @@ class FeedFixture extends Feed { 'updateMode' => 0, 'updateErrorCount' => 0, 'lastUpdateError' => '', - ], $defaults); + ], $defaults + ); unset($defaults['items']); $this->fillDefaults($defaults); } diff --git a/tests/Integration/Fixtures/Fixture.php b/tests/Integration/Fixtures/Fixture.php index f17beb25c..1874c8102 100644 --- a/tests/Integration/Fixtures/Fixture.php +++ b/tests/Integration/Fixtures/Fixture.php @@ -5,7 +5,7 @@ * 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> + * @author Bernhard Posselt <dev@bernhard-posselt.com> * @copyright Bernhard Posselt 2015 */ @@ -13,9 +13,11 @@ namespace OCA\News\Tests\Integration\Fixtures; -trait Fixture { +trait Fixture +{ - protected function fillDefaults(array $defaults=[]) { + protected function fillDefaults(array $defaults=[]) + { foreach ($defaults as $key => $value) { $method = 'set' . ucfirst($key); $this->$method($value); diff --git a/tests/Integration/Fixtures/FolderFixture.php b/tests/Integration/Fixtures/FolderFixture.php index 150557b8b..2564e8b71 100644 --- a/tests/Integration/Fixtures/FolderFixture.php +++ b/tests/Integration/Fixtures/FolderFixture.php @@ -5,7 +5,7 @@ * 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> + * @author Bernhard Posselt <dev@bernhard-posselt.com> * @copyright Bernhard Posselt 2015 */ @@ -15,19 +15,23 @@ namespace OCA\News\Tests\Integration\Fixtures; use OCA\News\Db\Folder; -class FolderFixture extends Folder { +class FolderFixture extends Folder +{ use Fixture; - public function __construct(array $defaults=[]) { + public function __construct(array $defaults=[]) + { parent::__construct(); - $defaults = array_merge([ + $defaults = array_merge( + [ 'parentId' => 0, 'name' => 'folder', 'userId' => 'test', 'opened' => true, 'deletedAt' => 0, 'lastModified' => 9 - ], $defaults); + ], $defaults + ); unset($defaults['feeds']); $this->fillDefaults($defaults); } diff --git a/tests/Integration/Fixtures/ItemFixture.php b/tests/Integration/Fixtures/ItemFixture.php index 0832b0ef4..450b56f82 100644 --- a/tests/Integration/Fixtures/ItemFixture.php +++ b/tests/Integration/Fixtures/ItemFixture.php @@ -5,7 +5,7 @@ * 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> + * @author Bernhard Posselt <dev@bernhard-posselt.com> * @copyright Bernhard Posselt 2015 */ @@ -15,12 +15,15 @@ namespace OCA\News\Tests\Integration\Fixtures; use OCA\News\Db\Item; -class ItemFixture extends Item { +class ItemFixture extends Item +{ use Fixture; - public function __construct(array $defaults=[]) { + public function __construct(array $defaults=[]) + { parent::__construct(); - $defaults = array_merge([ + $defaults = array_merge( + [ 'url' => 'http://google.de', 'title' => 'title', 'author' => 'my author', @@ -33,7 +36,8 @@ class ItemFixture extends Item { 'starred' => false, 'lastModified' => 113, 'rtl' => false, - ], $defaults); + ], $defaults + ); if (!array_key_exists('guid', $defaults)) { $defaults['guid'] = $defaults['title']; diff --git a/tests/Integration/Fixtures/data/default.php b/tests/Integration/Fixtures/data/default.php index 862515b12..41935b5c6 100644 --- a/tests/Integration/Fixtures/data/default.php +++ b/tests/Integration/Fixtures/data/default.php @@ -5,7 +5,7 @@ * 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> + * @author Bernhard Posselt <dev@bernhard-posselt.com> * @copyright Bernhard Posselt 2015 */ diff --git a/tests/Integration/Fixtures/data/readitem.php b/tests/Integration/Fixtures/data/readitem.php index 8f953a845..425492741 100644 --- a/tests/Integration/Fixtures/data/readitem.php +++ b/tests/Integration/Fixtures/data/readitem.php @@ -5,7 +5,7 @@ * 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> + * @author Bernhard Posselt <dev@bernhard-posselt.com> * @copyright Bernhard Posselt 2015 */ |