lithium\test\Group::_resolve PHP Method

_resolve() protected method

Resolves a unit test class (or classes) from a class or namespace path string.
protected _resolve ( string $test ) : array
$test string The path string in which to find the test case(s). This may be a library, a namespace, or a fully-namespaced class reference.
return array Returns an array containing one or more fully-namespaced class references to unit tests.
    protected function _resolve($test)
    {
        if (strpos($test, '\\') === false && Libraries::get($test)) {
            return (array) Libraries::find($test, array('recursive' => true, 'filter' => '/(cases|integration|functional)\\\\.*Test$/', 'exclude' => '/tests\\\\mocks/'));
        }
        if (!($test = trim($test, '\\'))) {
            return array();
        }
        list($library, $path) = explode('\\', $test, 2) + array($test, null);
        return (array) Libraries::find($library, array('recursive' => true, 'path' => '/' . str_replace('\\', '/', $path), 'filter' => '/(cases|integration|functional)\\\\.*Test$/', 'exclude' => strstr($test, 'tests\\mocks') ? '' : '/tests\\\\mocks/'));
    }