lithium\tests\cases\core\LibrariesTest::testPathFiltering PHP Метод

testPathFiltering() публичный Метод

public testPathFiltering ( )
    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) {
            $config = Libraries::get(true);
            $tests = Libraries::find($config['name'], array('recursive' => true, 'path' => '/tests/cases'));
            $prefix = preg_quote($config['prefix']);
            $result = preg_grep('/^' . $prefix . 'tests\\\\cases\\\\/', $tests);
            $this->assertIdentical($tests, $result);
        }
    }