public function FeedsExJsonPathUnitTests::testErrorHandling in Feeds extensible parsers 7.2
Tests parsing error handling.
File
- src/
Tests/ FeedsExJsonPath.test, line 71 - Contains tests for FeedsExJsonPath.
Class
- FeedsExJsonPathUnitTests
- Unit tests for FeedsExJsonPath.
Code
public function testErrorHandling() {
// Parse some invalid JSON.
json_decode('\\"asdfasfd');
$parser = FeedsConfigurable::instance('FeedsExJsonPath', 'test_parser');
$errors = $this
->invokeMethod($parser, 'getErrors');
$this
->assertEqual(3, $errors[0]['severity']);
}