public function FeedTypeTest::testAddCustomSource in Feeds 8.3
@covers ::addCustomSource
File
- tests/
src/ Unit/ Entity/ FeedTypeTest.php, line 131
Class
- FeedTypeTest
- @coversDefaultClass \Drupal\feeds\Entity\FeedType @group feeds
Namespace
Drupal\Tests\feeds\Unit\EntityCode
public function testAddCustomSource() {
// Add a custom source.
$this
->assertSame($this->feedType, $this->feedType
->addCustomSource('source2', [
'label' => 'Source 2',
'value' => 'Source 2',
]));
// Assert that the source exists as one of the mapping sources.
$expected = [
'source1' => [
'label' => 'Source 1',
'value' => 'Source 1',
],
'source2' => [
'label' => 'Source 2',
'value' => 'Source 2',
],
];
$this
->assertSame($expected, $this->feedType
->getMappingSources());
}