Skip to content

Commit d2b12ce

Browse files
authored
Fixed absolute path detection (#45)
* Fixed absolute path detection * Fixed regex in path
1 parent fd66488 commit d2b12ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/PhiremockExtension/Path.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function __construct(string $path)
3333

3434
public function absoluteOrRelativeToCodeceptionDir(): string
3535
{
36-
if (substr($this->path, 0, 1) === '/') {
36+
if (preg_match('~^(?:[a-z]:\\\|/)~i', $this->path) === 1) {
3737
return $this->path;
3838
}
3939
return Configuration::projectDir() . $this->path;

0 commit comments

Comments
 (0)