diff --git a/tests/behat/features/bootstrap/BaseFeatureContext.php b/tests/behat/features/bootstrap/BaseFeatureContext.php index d87aa851..9b90c0d2 100644 --- a/tests/behat/features/bootstrap/BaseFeatureContext.php +++ b/tests/behat/features/bootstrap/BaseFeatureContext.php @@ -233,4 +233,13 @@ class BaseFeatureContext extends BehatContext $oUser->setRating((int)$carmaPoints); $this->getEngine()->User_Update($oUser); } + + /** + * @When /^I put the file "([^"]*)" to "([^"]*)"$/ + */ + public function iPutTheFileTo($fileName, $path) + { + $fixturePath = realpath((dirname(__FILE__)) . "/../../../../"); + $this->getMinkContext()->attachFileToField($path, $fixturePath . $fileName); + } }