Added support of optional full paths for uploads in the trait
This was implemented in the MinkContext in f4b9700 but the trait was not
in sync.
This commit is contained in:
@@ -270,7 +270,10 @@ trait MinkDictionary
|
||||
$field = $this->fixStepArgument($field);
|
||||
|
||||
if ($this->getMinkParameter('files_path')) {
|
||||
$path = rtrim($this->getMinkParameter('files_path'), DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR.$path;
|
||||
$fullPath = rtrim(realpath($this->getMinkParameter('files_path')), DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR.$path;
|
||||
if (is_file($fullPath)) {
|
||||
$path = $fullPath;
|
||||
}
|
||||
}
|
||||
|
||||
$this->getSession()->getPage()->attachFileToField($field, $path);
|
||||
|
||||
Reference in New Issue
Block a user