You are here

public function FeedTypeTest::testGetCustomSource in Feeds 8.3

@covers ::getCustomSource

File

tests/src/Unit/Entity/FeedTypeTest.php, line 155

Class

FeedTypeTest
@coversDefaultClass \Drupal\feeds\Entity\FeedType @group feeds

Namespace

Drupal\Tests\feeds\Unit\Entity

Code

public function testGetCustomSource() {

  // Get an existing source.
  $expected = [
    'label' => 'Source 1',
    'value' => 'Source 1',
  ];
  $this
    ->assertSame($expected, $this->feedType
    ->getCustomSource('source1'));

  // Get a non-existing source.
  $this
    ->assertSame(NULL, $this->feedType
    ->getCustomSource('non_existing'));
}