Now the user has a profile. We are going to add file upload. I will walk through the process, like previously, using Behat so we can see the process from the "outside in", for example, how the product owner sees the feature and builds from the "inside out", for example, where the classes take a message and process it to make a response.
The previous recipe will help set up the profile area but honestly any form you are working on will do.
Let us first write our Behat user story as a starter point. This will help take on that task in a more "test-first" process. So our test file
features/profile/profile_image.feature
looks like this:Then our
behat.yml
is made aware of this new "suite" to test:Then, just like before, we make the Behat context file for that in
features/bootstrap/ProfileImageDomainContext.php
, setting it up for Behat to fill in the blanks for us:Now the file has the methods stubbed...