13/02/2015 - BEHAT
You can use example below to upload files.
Make sure that you have folder structure below.
# Your application
football
build
dummy
document
hello.doc
world.xls
image
test.jpg
Apart from other common setting, you must define file_path
key.
default:
extensions:
Behat\MinkExtension\Extension:
files_path: %behat.paths.base%/build/dummy/
Actual built-in method is here.
Feature: Example feature
Scenario: I can upload image
Given I am on "/"
When I attach the file "image/test.jpg" to "league_flag"
And I press "Submit"
Then I should see "Succeeded."