public function PatternsParserTestCase::check_invalid in Patterns 7.2
Same name and namespace in other branches
- 7 tests/parser/parser.test \PatternsParserTestCase::check_invalid()
File
- tests/
parser/ parser.test, line 77 - SimpleTests for the Taxonomy component of Patterns.
Class
- PatternsParserTestCase
- @file SimpleTests for the Taxonomy component of Patterns.
Code
public function check_invalid($pattern) {
$scan = $this
->scan_pattern($pattern);
$analysis = $this
->analyze_scan($scan, PATTERNS_VALIDATE_SYNTAX);
$this
->assertNotEqual(count($analysis), 0, t('No error message generated while parsing syntactically valid pattern.'));
$analysis = $this
->analyze_scan($scan, PATTERNS_VALIDATE_ALL);
$this
->assertNotEqual(count($analysis), 0, t('Error messages generated while parsing semantically invalid pattern.'));
}