You are here

public function JsonPathParserTest::testErrorHandling in Feeds extensible parsers 8

Tests parsing error handling.

File

tests/src/Unit/Feeds/Parser/JsonPathParserTest.php, line 67

Class

JsonPathParserTest
@coversDefaultClass \Drupal\feeds_ex\Feeds\Parser\JsonPathParser @group feeds_ex

Namespace

Drupal\Tests\feeds_ex\Unit\Feeds\Parser

Code

public function testErrorHandling() {

  // Parse some invalid JSON.
  json_decode('\\"asdfasfd');
  $errors = $this
    ->invokeMethod($this->parser, 'getErrors');
  $this
    ->assertSame(3, $errors[0]['severity']);
}