Yii Book - The testing

To the author Jeffrey Winesett :

Why would you introduce irrelevant content about testing in this book?

In chapter 3 and chapter 4, the testing part really confused me and made frustrated, because I couldn’t even get the P***, S***, PHPUnit installed correctly. Please stop using the command line tools, because all the command line tools almost all don’t work on my computer. They don’t work because there are multi level dependence exist. You failed to tell them all to me. It’s not because I am stupid, it’s because you didn’t provide enough materials for me to understand.

As a beginner, I expect this book to teach me one thing, that is Yii. All everything else, I really don’t want to learn, because my brain is not as big as yours! After I learned Yii, then I may want to explore things about testing…

By introducing a new tool or concept about testing, you increase the level of complexity by a whole new degree! I can’t handle that!

Perhaps the target audience of the Yii book is not the kind of people like you? IMHO installation details should not covered, leave them to tutorial sites. Also, get on Linux/MacOS, command line just works here.

what a nice first post! welcome!

nettrinity, let me disagree with you.

I think introducing testing in the context of learning yii, or any other framework for that matter, is a good choice.

Normally people use frameworks to develop software quicker but also more professionally (at least this is my case and a few more I happen to know). Learning to run tests, like learning a framework, brings you to the web dev field in a more professional manner.

I agree this is an option for the developer to choose but since testing is already nicely integrated with phpunit, learning to use it and getting the habit of it is, at least, reasonable. In addition to this, I see it as an opportunity to learn the practicalities of using phpunit within the already practical context described in the book to learn yii.

I haven’t finished yet the book, I’m on chapter 9, and for all I’ve seen I’m quite happy with it. There are a few mistakes, more than I’d expect, especially concerning the editing but the content is definitely not irrelevant, not even a gram of it.

I am sorry that your experience with attempting to lean Yii by using this book has been sub-optimal. I do believe testing is both relevant to general application development/software engineering and, as Yii integrates with both PHPUnit and Selenium, a relevant topic to cover within the context of introducing the framework features.

I also believe that it is possible skip the test-driven approach when reading through the topics covered in the book and still become well acquainted with Yii and its myriad features.

The book also does not cover things like Web Server installation and configuration, PHP installation and configuration, a Database Server installation and configuration, the Operating System, or how to turn on a computer. The book is targeted at somewhat experienced LAMP(hp) stack application developers looking to add Yii to their existing development toolbox. It is probably not the best book for someone brand new to programming in this environment.

If you have specific questions about Yii, within the context of the topics covered in the book or otherwise, I and many others in this forum are happy to help get them answered.

Thank everybody for showing concern about my post. I am still learning Yii, figuring out one puzzle each day. Hope I can reach a level to understand Yii wiki post one day.


Nicolas Xu

I agree with nettrinity: PHPUnit is a POS.

I understand the author not wanting to explain every technology involved. For instance, there’s no need to explain PHP because its a widely used product with tons of documentation.

But it is an entirely different matter to leave out something like PHPUnit.

  1. Its hosted on a terrible web server. Had to run the pear instalerl three times before it received all the packages.

  2. Its unintuitive and has almost no documentation.

  3. It’s developed by a single person who hasn’t done a good job of maintaining it and could stop altogether at any time.

  4. If it fails, no error messages are displayed. Here’s what I’m f***ing dealing with:

C:\inetpub\wwwroot\demo\protected\tests>phpunit unit/MessageTest.php


Problem with my installation? Problem with my code? I’ll never f***ing know.

I’m extremely disappointed in this book and the author.

To be fair to PHPUnit and the author,

PHPUnit is the most widely use unit testing framework for PHP. I have no problem installing it, every time it works.

I had no problem finding documentation on the web and using it along with Yii Framework, without even reading the book, I learn about unit testing, PHPUnit, running PHPUnit with Yii purely from the net. Perhaps you just don’t get unit testing?

Hey, it is open source, if you don’t like any part of it, fork it!

Never had any problem with me running it on Linux, everything just works.

Writing a book costs a lot of effort and very time consuming, so please show a bit of appreciation, even just a bit. If you can’t solve your problem on your own, then search for an answer. If google can’t help you, then ask in this forum.

I also started learning Yii by reading the book. I just skipped everything about PHPUnit.

Just expressed my opinion. I can see that the thread starter already moved on, but still I feel like commenting out.