public function FeedHandlerBaseTest::testConstruct in Feeds 8.3
Tests if an instance of FeedHandlerBase can be created.
@covers ::__construct @covers ::createInstance
File
- tests/
src/ Unit/ FeedHandlerBaseTest.php, line 22
Class
- FeedHandlerBaseTest
- @coversDefaultClass \Drupal\feeds\FeedHandlerBase @group feeds
Namespace
Drupal\Tests\feeds\UnitCode
public function testConstruct() {
$container = new ContainerBuilder();
$container
->set('event_dispatcher', $this
->createMock(EventDispatcherInterface::class));
$mock = $this
->getMockForAbstractClass(FeedHandlerBase::class, [], '', FALSE);
$mock_class = get_class($mock);
$handler = $mock_class::createInstance($container, $this
->createMock(EntityTypeInterface::class));
$this
->assertInstanceOf(FeedHandlerBase::class, $handler);
}