You are here

public function TestMapper::testGetTargets in Feeds Paragraphs 8

@covers ::getTargets

File

tests/src/Unit/TestMapper.php, line 47

Class

TestMapper
@group Feeds Paragraphs @coversDefaultClass \Drupal\feeds_para_mapper\Mapper

Namespace

Drupal\Tests\feeds_para_mapper\Unit

Code

public function testGetTargets() {
  $targets = $this->mapper
    ->getTargets('node', 'product');
  $message = "Targets found";
  self::assertTrue(count($targets) > 0, $message);
  $targets = $this->mapper
    ->getTargets('test', 'test');
  $message = "Returns empty array if there are no targets";
  self::assertTrue(is_array($targets) && count($targets) === 0, $message);
}