You are here

public function ParseEventTest::test in Feeds 8.3

@covers ::getFetcherResult @covers ::getParserResult

File

tests/src/Unit/Event/ParseEventTest.php, line 18

Class

ParseEventTest
@coversDefaultClass \Drupal\feeds\Event\ParseEvent @group feeds

Namespace

Drupal\Tests\feeds\Unit\Event

Code

public function test() {
  $feed = $this
    ->createMock('Drupal\\feeds\\FeedInterface');
  $fetcher_result = $this
    ->createMock('Drupal\\feeds\\Result\\FetcherResultInterface');
  $parser_result = $this
    ->createMock('Drupal\\feeds\\Result\\ParserResultInterface');
  $event = new ParseEvent($feed, $fetcher_result);
  $this
    ->assertSame($fetcher_result, $event
    ->getFetcherResult());
  $event
    ->setParserResult($parser_result);
  $this
    ->assertSame($parser_result, $event
    ->getParserResult());
}