adjust tests
This could really use some more tests but this has to suffice for now.
This commit is contained in:
12
Path.php
12
Path.php
@@ -14,6 +14,16 @@ class Path
|
||||
$this->paths = $this->parsePathConfig($pathConfig);
|
||||
}
|
||||
|
||||
/**
|
||||
* Access the parsed paths
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getPaths()
|
||||
{
|
||||
return $this->paths;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse the path configuration into an internal array
|
||||
*
|
||||
@@ -133,7 +143,7 @@ class Path
|
||||
for ($i = 0; $i < $counter; $i++) {
|
||||
if ('.' == $path[$i]) continue;
|
||||
if ('' === $path[$i] && $i > 0) continue;
|
||||
if ('..' == $path[$i] && '..' != $output[count($output) - 1]) {
|
||||
if ('..' == $path[$i] && '..' != ($output[count($output) - 1] ?? '')) {
|
||||
array_pop($output);
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user