summaryrefslogtreecommitdiffstats
path: root/tests/Unit/Controller
diff options
context:
space:
mode:
authorDaniel Opitz <danopz@users.noreply.github.com>2017-08-14 10:34:53 +0200
committerBernhard Posselt <BernhardPosselt@users.noreply.github.com>2017-08-14 10:34:53 +0200
commita97dd58e3b499b60ac8b37786d402d7f2e371a88 (patch)
tree98bb8a6c750fb33fbef38d22407fa29fbf6c7b1e /tests/Unit/Controller
parent7d8a85c82c4c13a71b70ddb4ecb8c40ede4c9b70 (diff)
Split binary to booleans (#203)
* replaced old status with 2 flags for unread and starred * add fields to db, replace int(1,0) with booleans in sql queries, removed StatusFlags class + refactor code relying to it * add repair step for migration * again use integer(1,0) instead of bool in sql queries, because of sqlite doesn't support true/false * add/fix unit tests for new boolean status * set unread/starred flags as statements in sql * fixed mysql unknown column items.unread, fixed marking of read items on repair step * remove unnecessary bool casts * add empty checks to Items::is* methods * update migration to use native sql instead of the querybuilder * don't cast the flags manually, let the api do the work
Diffstat (limited to 'tests/Unit/Controller')
-rw-r--r--tests/Unit/Controller/EntityApiSerializerTest.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/Unit/Controller/EntityApiSerializerTest.php b/tests/Unit/Controller/EntityApiSerializerTest.php
index ec357e7f2..63de1ed7e 100644
--- a/tests/Unit/Controller/EntityApiSerializerTest.php
+++ b/tests/Unit/Controller/EntityApiSerializerTest.php
@@ -29,7 +29,7 @@ class EntityApiSerializerTest extends \PHPUnit_Framework_TestCase {
public function testSerializeSingle() {
$item = new Item();
- $item->setUnread();
+ $item->setUnread(true);
$serializer = new EntityApiSerializer('items');
$result = $serializer->serialize($item);
@@ -40,10 +40,10 @@ class EntityApiSerializerTest extends \PHPUnit_Framework_TestCase {
public function testSerializeMultiple() {
$item = new Item();
- $item->setUnread();
+ $item->setUnread(true);
$item2 = new Item();
- $item2->setRead();
+ $item2->setUnread(false);
$serializer = new EntityApiSerializer('items');
@@ -66,10 +66,10 @@ class EntityApiSerializerTest extends \PHPUnit_Framework_TestCase {
public function testCompleteArraysTransformed() {
$item = new Item();
- $item->setUnread();
+ $item->setUnread(true);
$item2 = new Item();
- $item2->setRead();
+ $item2->setUnread(false);
$serializer = new EntityApiSerializer('items');