David
David

Reputation: 10758

getting phpunit to work with zend framework2

I'm working through the Zend Framework2 tutorial and I'm at the very end of this (getting phpunit running):

http://framework.zend.com/manual/2.1/en/user-guide/unit-testing.html

I included "phpunit/phpunit": "3.7.*" into my composer.json file, updated it and it looks like it installed into the "Vendor" directory of my project.

How do I use it now? I'm on a Mac. I'm at this part: Finally, cd to zf-tutorial/module/Application/test/ and run phpunit. Because i don't have phpunit installed in my $PATH, which file do i use as the executable? Any help would be much appreciated.

Here is my folder structure. enter image description here

Upvotes: 4

Views: 156

Answers (1)

Ocramius
Ocramius

Reputation: 25440

The command you have to run to use phpunit when installed via composer is ./vendor/bin/phpunit

You can read more about how composer handles binaries at http://getcomposer.org/doc/articles/vendor-binaries.md

Upvotes: 2

Related Questions