diff options
author | Benjamin Brahmer <info@b-brahmer.de> | 2022-08-06 10:17:05 +0200 |
---|---|---|
committer | Benjamin Brahmer <info@b-brahmer.de> | 2022-08-06 10:17:05 +0200 |
commit | 39f5e9cdbe302be7bef90a2b3ebf5c846b6e08dc (patch) | |
tree | 09b92b502c9878298ec38f1614dffac4e60e50ad | |
parent | 5f620703a913e456c32063d2af3dcb63a7cf2fba (diff) |
Rewrite unit-testchange/autodiscover
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
-rw-r--r-- | tests/Unit/Service/FeedServiceTest.php | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/tests/Unit/Service/FeedServiceTest.php b/tests/Unit/Service/FeedServiceTest.php index 632b8d6cc..f0c367b7a 100644 --- a/tests/Unit/Service/FeedServiceTest.php +++ b/tests/Unit/Service/FeedServiceTest.php @@ -165,20 +165,14 @@ class FeedServiceTest extends TestCase public function testCreateDoesNotFindFeed() { - $ex = new ReadErrorException('hi'); $url = 'test'; - $this->mapper->expects($this->once()) - ->method('findByURL') - ->with($this->uid, $url) - ->willReturn(new Feed()); - $this->fetcher->expects($this->exactly(2)) ->method('fetch') - ->with($url); + ->with($url) + ->will($this->throwException(new ReadErrorException('There is no feed'))); - $this->expectException(ServiceConflictException::class); - $this->expectExceptionMessage('Feed with this URL exists'); + $this->expectException(ServiceNotFoundException::class); $this->class->create($this->uid, $url, 1); } |