public function FeedsExJsonPathUnitTests::testValidateExpression in Feeds extensible parsers 7.2
Tests JSONPath validation.
@todo Do real validation.
File
- src/
Tests/ FeedsExJsonPath.test, line 131 - Contains tests for FeedsExJsonPath.
Class
- FeedsExJsonPathUnitTests
- Unit tests for FeedsExJsonPath.
Code
public function testValidateExpression() {
// Invalid expression.
$parser = FeedsConfigurable::instance('FeedsExJsonPath', 'test_parser');
$expression = array(
'!! ',
);
$this
->assertEqual(NULL, $this
->invokeMethod($parser, 'validateExpression', $expression));
// Test that value was trimmed.
$this
->assertEqual($expression[0], '!!', 'Value was trimmed.');
}