anyone using PHPUNIT?
Moderator: General Moderators
anyone using PHPUNIT?
Is anybody using actually PHPUnit2 for testcases.
I mean for php5 with exceptions and evertything. is it good enough to rely on in production environment.
I mean for php5 with exceptions and evertything. is it good enough to rely on in production environment.
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Does that mean that I should use both if I am to completely test stuff right now.arborint wrote:PHPUnit is the insider's choice, and SimpleTest is the outsider's choice. Given the difference in the promotional attitudes of the respective authors it is not suprising. I doubt that technical superiority matters much in this case.
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
timvw is right, SimpleTest will run most of PHPUnit's tests.jmut wrote:Does that mean that I should use both if I am to completely test stuff right now.arborint wrote:PHPUnit is the insider's choice, and SimpleTest is the outsider's choice. Given the difference in the promotional attitudes of the respective authors it is not suprising. I doubt that technical superiority matters much in this case.
But the answer to your question is a question: Do you want to be and insider or and outsider?
(#10850)
- Ambush Commander
- DevNet Master
- Posts: 3698
- Joined: Mon Oct 25, 2004 9:29 pm
- Location: New Jersey, US
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
I think of the insiders as the traditional style PHP developers centered around the various companies and groups that build or build upon PHP. The outsiders are OO, test-driven, agile developers who take a more progressive approach to PHP development.
An example of the difference: the traditional group considers "Extreme Simplicity" to be things like big convenience classes full of helper functions; the progressive group considers "Extreme Simplicity" to be things lots of small classes that are easily testable.
An example of the difference: the traditional group considers "Extreme Simplicity" to be things like big convenience classes full of helper functions; the progressive group considers "Extreme Simplicity" to be things lots of small classes that are easily testable.
(#10850)
- Ambush Commander
- DevNet Master
- Posts: 3698
- Joined: Mon Oct 25, 2004 9:29 pm
- Location: New Jersey, US
well I guess I want to be an outsider.arborint wrote:I think of the insiders as the traditional style PHP developers centered around the various companies and groups that build or build upon PHP. The outsiders are OO, test-driven, agile developers who take a more progressive approach to PHP development.
An example of the difference: the traditional group considers "Extreme Simplicity" to be things like big convenience classes full of helper functions; the progressive group considers "Extreme Simplicity" to be things lots of small classes that are easily testable.
I am reading those design patterns stuff.
A few days a go I finished
"Refactoring: Improving the Design of Existing Code" by Martin Fowler
It is very good reading but as it reads it is hard doing refactoring without having solid tests.
This is how I decided to learn and begin test driven development...hence this topic
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
If you have questions ask them here as you go. There are a number of people around here who can be of help, and I believe that Marcus Baker (of SimpleTest) reads this forum as well.jmut wrote:It is very good reading but as it reads it is hard doing refactoring without having solid tests.
This is how I decided to learn and begin test driven development...hence this topic
If you want to go through a TDD session in a thread, post your ideas/goals/requirements for something you would like to build and we can work through it.
(#10850)
10x a lot. Will have this in mindarborint wrote:If you have questions ask them here as you go. There are a number of people around here who can be of help, and I believe that Marcus Baker (of SimpleTest) reads this forum as well.jmut wrote:It is very good reading but as it reads it is hard doing refactoring without having solid tests.
This is how I decided to learn and begin test driven development...hence this topic
If you want to go through a TDD session in a thread, post your ideas/goals/requirements for something you would like to build and we can work through it.
Hi...
.
Regarding the SimpleTest/PHPUnit philosophies, it seems to me that PHPUnit is built for library work. It serves PEAR and Zend for example. The inclusion of code coverage is telling. SimpleTest is built for application testing (hence the web tester). It has less of an emphasis on building structures than getting immediate results, and evolving from there.
In that regard you are right. The web tester and mocks combine in a top down agile approach. With PHPUnit you will likely build bottom up.
yours, Marcus
Very occasionallyarborint wrote:...and I believe that Marcus Baker (of SimpleTest) reads this forum as well.
Regarding the SimpleTest/PHPUnit philosophies, it seems to me that PHPUnit is built for library work. It serves PEAR and Zend for example. The inclusion of code coverage is telling. SimpleTest is built for application testing (hence the web tester). It has less of an emphasis on building structures than getting immediate results, and evolving from there.
In that regard you are right. The web tester and mocks combine in a top down agile approach. With PHPUnit you will likely build bottom up.
yours, Marcus
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US