| 7 path.test | DrupalMatchPathTestCase::testDrupalMatchPath() |
| 8 path.test | DrupalMatchPathTestCase::testDrupalMatchPath() |
Run through our test cases, making sure each one works as expected.
File
- modules/
simpletest/ tests/ path.test, line 38 - Tests for path.inc.
Code
function testDrupalMatchPath() {
// Set up our test cases.
$tests = $this->drupalMatchPathTests();
foreach ($tests as $patterns => $cases) {
foreach ($cases as $path => $expected_result) {
$actual_result = drupal_match_path($path, $patterns);
$this->assertIdentical($actual_result, $expected_result, t('Tried matching the path <code>@path</code> to the pattern <pre>@patterns</pre> - expected @expected, got @actual.', array('@path' => $path, '@patterns' => $patterns, '@expected' => var_export($expected_result, TRUE), '@actual' => var_export($actual_result, TRUE))));
}
}
}
Login or register to post comments