public function FeedTest::testGetConfigurationFor in Feeds 8.3
@covers ::getConfigurationFor
File
- tests/
src/ Kernel/ Entity/ FeedTest.php, line 451
Class
- FeedTest
- @coversDefaultClass \Drupal\feeds\Entity\Feed @group feeds
Namespace
Drupal\Tests\feeds\Kernel\EntityCode
public function testGetConfigurationFor() {
$feed = $this
->createFeed($this->feedType
->id());
// This test does not work with a data provider as that results into phpunit
// passing an __PHP_Incomplete_Class.
$classes = [
FeedsPluginInterface::class,
FetcherInterface::class,
ParserInterface::class,
ProcessorInterface::class,
];
foreach ($classes as $class) {
$plugin = $this
->createMock($class);
$plugin
->expects($this
->atLeastOnce())
->method('defaultFeedConfiguration')
->will($this
->returnValue([]));
$this
->assertIsArray($feed
->getConfigurationFor($plugin));
}
}