public function FeedClearHandlerTest::testException in Feeds 8.3
@covers ::clear
File
- tests/
src/ Unit/ FeedClearHandlerTest.php, line 90
Class
- FeedClearHandlerTest
- @coversDefaultClass \Drupal\feeds\FeedClearHandler @group feeds
Namespace
Drupal\Tests\feeds\UnitCode
public function testException() {
$this->dispatcher
->addListener(FeedsEvents::CLEAR, function ($event) {
throw new \Exception();
});
$this->feed
->expects($this
->once())
->method('unlock');
$this
->expectException(\Exception::class);
$this->handler
->clear($this->feed, $this->context);
}