Bolt\Tests\BoltListener::getPath PHP Method

getPath() protected method

Resolve a file path.
protected getPath ( string $name, string $file ) : string
$name string
$file string
return string
    protected function getPath($name, $file)
    {
        if (file_exists($file)) {
            return $file;
        }
        if (file_exists(TEST_ROOT . '/' . $file)) {
            return TEST_ROOT . '/' . $file;
        }
        if (file_exists(TEST_ROOT . '/vendor/bolt/bolt/' . $file)) {
            return TEST_ROOT . '/vendor/bolt/bolt/' . $file;
        }
        throw new \InvalidArgumentException("The file parameter '{$name}:' '{$file}' in the PHPUnit XML file is invalid.");
    }