summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Brahmer <info@b-brahmer.de>2022-08-05 15:08:19 +0200
committerBenjamin Brahmer <info@b-brahmer.de>2022-08-05 15:08:19 +0200
commit2abfeb957911a1eda622e6ef14b96f57bb6eaeb6 (patch)
treeadf047389dac04baaa97989385dea76c751a5411
parentb893682ee775d9db5192bb01947359ca28c0876c (diff)
fix more tests
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
-rw-r--r--tests/Unit/Service/FeedServiceTest.php9
-rw-r--r--tests/command/feeds.bats1
2 files changed, 5 insertions, 5 deletions
diff --git a/tests/Unit/Service/FeedServiceTest.php b/tests/Unit/Service/FeedServiceTest.php
index b237cff0a..632b8d6cc 100644
--- a/tests/Unit/Service/FeedServiceTest.php
+++ b/tests/Unit/Service/FeedServiceTest.php
@@ -173,10 +173,9 @@ class FeedServiceTest extends TestCase
->with($this->uid, $url)
->willReturn(new Feed());
- $this->fetcher->expects($this->never())
+ $this->fetcher->expects($this->exactly(2))
->method('fetch')
- ->with($url)
- ->will($this->throwException($ex));
+ ->with($url);
$this->expectException(ServiceConflictException::class);
$this->expectExceptionMessage('Feed with this URL exists');
@@ -327,7 +326,7 @@ class FeedServiceTest extends TestCase
$this->mapper->expects($this->once())
->method('findByURL')
- ->with($this->uid, $url)
+ ->with($this->uid, 'http://discover.test')
->will($this->throwException(new DoesNotExistException('no')));
$this->explorer->expects($this->once())
->method('discover')
@@ -443,7 +442,7 @@ class FeedServiceTest extends TestCase
->with($url)
->will($this->throwException(new ReadErrorException('ERROR')));
- $this->mapper->expects($this->once())
+ $this->mapper->expects($this->never())
->method('findByURL')
->with($this->uid, $url)
->will($this->throwException(new DoesNotExistException('no')));
diff --git a/tests/command/feeds.bats b/tests/command/feeds.bats
index 6bebe469d..f89cd2afd 100644
--- a/tests/command/feeds.bats
+++ b/tests/command/feeds.bats
@@ -9,6 +9,7 @@ teardown() {
for ID in $ID_LIST; do
./occ news:feed:delete "$user" "$ID"
done
+ sleep 1
}
@test "[$TESTSUITE] Create new" {