summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMarco Nassabain <marco.nassabain@hotmail.com>2021-03-05 22:14:56 +0100
committerSean Molenaar <SMillerDev@users.noreply.github.com>2021-04-08 22:31:21 +0200
commit2cba1e4146221f28ac195f62fbbb6cd9dbb555fd (patch)
tree1ed604e762801d196cc59f5bd1c0d159e195c74c /tests
parent4612ed9bf0115d328d22beecb07179f3ae8f460d (diff)
🧹 Cleanup code, remove spaces, rename variables
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/Unit/Db/ItemMapperPaginatedTest.php1
-rw-r--r--tests/Unit/Db/ItemMapperTest.php6
-rw-r--r--tests/Unit/Service/ItemServiceTest.php3
-rw-r--r--tests/Unit/Service/ShareServiceTest.php4
4 files changed, 4 insertions, 10 deletions
diff --git a/tests/Unit/Db/ItemMapperPaginatedTest.php b/tests/Unit/Db/ItemMapperPaginatedTest.php
index e0625aa0c..330eaff51 100644
--- a/tests/Unit/Db/ItemMapperPaginatedTest.php
+++ b/tests/Unit/Db/ItemMapperPaginatedTest.php
@@ -1286,4 +1286,5 @@ class ItemMapperPaginatedTest extends MapperTestUtility
$result = $this->class->findAllFolder('jack', 2, 10, 10, false, false, ['key', 'word']);
$this->assertEquals([Item::fromRow(['id' => 4])], $result);
}
+
}
diff --git a/tests/Unit/Db/ItemMapperTest.php b/tests/Unit/Db/ItemMapperTest.php
index ba73d93b8..5cb42c3fa 100644
--- a/tests/Unit/Db/ItemMapperTest.php
+++ b/tests/Unit/Db/ItemMapperTest.php
@@ -388,11 +388,7 @@ class ItemMapperTest extends MapperTestUtility
$this->builder->expects($this->exactly(3))
->method('andWhere')
- ->withConsecutive(
- ['feeds.user_id = :user_id'],
- ['feeds.id = :feed_id'],
- ['items.guid_hash = :guid_hash']
- )
+ ->withConsecutive(['feeds.user_id = :user_id'], ['feeds.id = :feed_id'], ['items.guid_hash = :guid_hash'])
->will($this->returnSelf());
$this->builder->expects($this->exactly(3))
diff --git a/tests/Unit/Service/ItemServiceTest.php b/tests/Unit/Service/ItemServiceTest.php
index b1cbe6d8d..f91692cda 100644
--- a/tests/Unit/Service/ItemServiceTest.php
+++ b/tests/Unit/Service/ItemServiceTest.php
@@ -41,7 +41,6 @@ class ItemServiceTest extends TestCase
* @var MockObject|ItemMapperV2
*/
private $mapper;
-
/**
* @var ItemServiceV2
*/
@@ -71,7 +70,6 @@ class ItemServiceTest extends TestCase
$this->mapper = $this->getMockBuilder(ItemMapperV2::class)
->disableOriginalConstructor()
->getMock();
-
$this->config = $this->getMockBuilder(IConfig::class)
->disableOriginalConstructor()
->getMock();
@@ -631,4 +629,5 @@ class ItemServiceTest extends TestCase
$this->class->purgeOverThreshold(5);
}
+
}
diff --git a/tests/Unit/Service/ShareServiceTest.php b/tests/Unit/Service/ShareServiceTest.php
index 4c74e39a5..06359d572 100644
--- a/tests/Unit/Service/ShareServiceTest.php
+++ b/tests/Unit/Service/ShareServiceTest.php
@@ -107,8 +107,7 @@ class ShareServiceTest extends TestCase
// Shared item
$sharedItem = clone $item;
- $sharedItem
- ->setUnread(1) // A newly shared item is unread, ...
+ $sharedItem->setUnread(1) // A newly shared item is unread, ...
->setStarred(0) // ... not starred, ...
->setFeedId(100) // ... placed in the 'Shared with me' feed, ...
->setSharedBy($this->uid); // ... and contains the senders user ID
@@ -190,7 +189,6 @@ class ShareServiceTest extends TestCase
->with($this->recipient, $feedUrl)
->will($this->returnValue(null));
- // TODO: Test if the feed is properly created
$this->feedService->expects($this->once())
->method('insert')
->will($this->returnValue($feed));