summaryrefslogtreecommitdiffstats
path: root/tests/Unit/Service/FeedServiceTest.php
diff options
context:
space:
mode:
authorSean Molenaar <sean@m2mobi.com>2018-10-01 10:07:57 +0200
committerSean Molenaar <sean@m2mobi.com>2018-10-02 14:33:09 +0200
commitfa5f07ba9a77959796c3c7a4851f2f2fe1051afa (patch)
treec0eedead6788614b886940f892f23c6537368a19 /tests/Unit/Service/FeedServiceTest.php
parentc36b0a95685cb0daa3fce9d743b7610a5cfe50ed (diff)
Put back old tests for stable nextcloud version
Diffstat (limited to 'tests/Unit/Service/FeedServiceTest.php')
-rw-r--r--tests/Unit/Service/FeedServiceTest.php14
1 files changed, 8 insertions, 6 deletions
diff --git a/tests/Unit/Service/FeedServiceTest.php b/tests/Unit/Service/FeedServiceTest.php
index d5c5e0bfa..c7b06040a 100644
--- a/tests/Unit/Service/FeedServiceTest.php
+++ b/tests/Unit/Service/FeedServiceTest.php
@@ -22,8 +22,10 @@ use OCA\News\Db\Item;
use OCA\News\Fetcher\Fetcher;
use OCA\News\Fetcher\FetcherException;
+use PHPUnit\Framework\TestCase;
-class FeedServiceTest extends \PHPUnit_Framework_TestCase
+
+class FeedServiceTest extends TestCase
{
private $feedMapper;
@@ -114,7 +116,7 @@ class FeedServiceTest extends \PHPUnit_Framework_TestCase
->method('fetch')
->with($this->equalTo($url))
->will($this->throwException($ex));
- $this->setExpectedException(
+ $this->expectException(
'\OCA\News\Service\ServiceNotFoundException'
);
$this->feedService->create($url, 1, $this->user);
@@ -606,7 +608,7 @@ class FeedServiceTest extends \PHPUnit_Framework_TestCase
)
->will($this->throwException($ex));
- $this->setExpectedException(
+ $this->expectException(
'\OCA\News\Service\ServiceNotFoundException'
);
$this->feedService->update($feed->getId(), $this->user);
@@ -643,7 +645,7 @@ class FeedServiceTest extends \PHPUnit_Framework_TestCase
)
->will($this->throwException($ex));
- $this->setExpectedException(
+ $this->expectException(
'OCP\AppFramework\Db\DoesNotExistException'
);
$this->feedService->update($feed->getId(), $this->user);
@@ -698,7 +700,7 @@ class FeedServiceTest extends \PHPUnit_Framework_TestCase
)
->will($this->throwException($ex));
- $this->setExpectedException(
+ $this->expectException(
'\OCA\News\Service\ServiceNotFoundException'
);
$this->feedService->update($feed->getId(), $this->user);
@@ -1100,7 +1102,7 @@ class FeedServiceTest extends \PHPUnit_Framework_TestCase
)
->will($this->throwException(new DoesNotExistException('')));
- $this->setExpectedException(
+ $this->expectException(
'\OCA\News\Service\ServiceNotFoundException'
);