eyeway (2) [Avatar] Offline
Hi, I read the book but stuck in chapter 3 and unit test. The reason was that I had no prior expeience with unit testing and phpunit.
I had to search for resouces as the book does not give much details about how to install and use phpunit.

I am working on a Windows Vista machine with Zend Server installed.
After 3 days of searching and testing I managed to install Pear and then phpunit.
I tried to run the tests described in the book but had no success.
FInally I figured out that 2 things that are important in order for the test to run are the following:
1. you should navigate to the tests folder of your Zend Framework project.
2. Inside the tests folder of your project there is a phpunit.xml file wich is empty.
You should at least enter the following code :

<phpunit bootstrap="" colors="true"> </phpunit>

After doing so your test will run fron the command line.

I read alot of posts regarding this issue. Alot of criticisme also was made to the way the book is treating this subject. I think that all this research I made in order to resolve the testing issue gave me knowledg that is valuable.
The book is OK. Until this point it helped me alot. And even is I need to do some research on my own to understand some things I believe that is doing it's job well.
akrabat (479) [Avatar] Offline
Re: Unit testing with phpunit on ch3
Thanks for the information!