Anyone has been using Behat with Zend Framework? Any examples on how to use both?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I got it working. It works with
PHPUnitandZend_Testso you can use all those niftyassertXYZ()methods. First, make sure you’ve gotbehatinstalled and available in your system$PATH. I did the following:Now, create a directory structure like so:
The
features/application/ControllerTestCase.phpclass is typical of aZend_Testtesting implementation:The
features/bootstrap/FeatureContext.phpclass is what Behat needs to bootstrap itself:And now you can write features like
features/homepage.feature:To run the tests,
cdto the directory that contains thefeaturesfolder, and typebehat.Good luck!