public function testPathFiltering() {
$tests = Libraries::find('lithium', array('recursive' => true, 'path' => '/tests/cases'));
$result = preg_grep('/^lithium\\\\tests\\\\cases\\\\/', $tests);
$this->assertIdentical($tests, $result);
$all = Libraries::find('lithium', array('recursive' => true));
$result = array_values(preg_grep('/^lithium\\\\tests\\\\cases\\\\/', $all));
$this->assertIdentical($tests, $result);
if ($this->hasApp) {
$tests = Libraries::find('app', array('recursive' => true, 'path' => '/tests/cases'));
$result = preg_grep('/^app\\\\tests\\\\cases\\\\/', $tests);
$this->assertIdentical($tests, $result);
}
}