Validates an absolute or relative path to test cases.

Parameters

  • string $path The directory or file path to one or more test cases

Returns

string Returns a fully-resolved physical path, or `false`, if an error occurs.

Source

						protected function _path($path) {
		$path = str_replace('\\', '/', $path);

		if (!$path) {
			$this->error('Please provide a path to tests.');
			return false;
		}
		if ($path[0] != '/') {
			$path = $this->request->env('working') . '/' . $path;
		}
		if (!$path = realpath($path)) {
			$this->error('Not a valid path.');
			return false;
		}

		if (!$libraryPath = $this->_library($path)) {
			$this->error("No library registered for path `{$path}`.");
			return false;
		}
		return $libraryPath;
	}