How to install Behat & Mink on Mac OSX

Behat is a Behaviour Driven Development framework developed in PHP.
It allows you to create functional tests based on a human reading language, Gherkin.

The easiest way to install all this stuff is using PEAR.
If you don’t have PEAR, you can install it using MacPort (Linux users can do the same via apt or whatever)
It requires php5 and some extensions that can be installed like that :

sudo port install php5 php5-mbstring php5-iconv php5-posix php5-openssl php-pear

Now, behat and his friends can be installed via pear :

sudo pear upgrade PEAR
sudo pear channel-discover pear.phpunit.de
sudo pear channel-discover components.ez.no
sudo pear channel-discover pear.symfony-project.com
sudo pear channel-discover pear.symfony.com
sudo pear channel-discover pear.behat.org
sudo pear install phpunit/PHPUnit
sudo pear install --alldeps behat/behat
sudo pear install --alldeps behat/mink

You can now verify that your shell completion answers to behat with “beh + TAB”. You’re done !

Tags: , , , ,

Comments are closed.

Leave a Reply

Want to join the discussion?
Feel free to contribute!