For Programmers: Free Programming Magazines  


Home > Archive > PHP PEAR Questions and Answers > June 2004 > Re: [PEAR-QA] Re: Unit test standard









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PEAR-QA] Re: Unit test standard
Sebastian Bergmann

2004-06-07, 3:56 am

Greg Beaver wrote:
> PHPUnit is in PEAR, but not as powerful as Simpletest.


Having not (not recently, anyway) looked at SimpleTest: What do you
miss from PHPUnit2? It offers the complete JUnit 3.8 functionality as
well as extensions like Code Coverage (Which lines of production code
are covered by Unit Tests? Which are not?).

Thanks,
Sebastian

--
Sebastian Bergmann
http://sebastian-bergmann.de/ http://phpOpenTracker.de/

Das Buch zu PHP 5: http://professionelle-softwareentwicklung-mit-php5.de/
Greg Beaver

2004-06-07, 3:56 am

Sebastian Bergmann wrote:

> Greg Beaver wrote:
>
>
>
> Having not (not recently, anyway) looked at SimpleTest: What do you
> miss from PHPUnit2? It offers the complete JUnit 3.8 functionality as
> well as extensions like Code Coverage (Which lines of production code
> are covered by Unit Tests? Which are not?).


All I miss is documentation and PHP4 support. When I stop coding PHP4
(may that day come soon), the choices will be different.

I should have mentioned that difference, though, you're right.

PHPUnit does not have mock objects support, Simpletest does.
PHPUnit2 does have mock object support, but doesn't work in PHP4

Greg
Sebastian Bergmann

2004-06-07, 3:56 am

Greg Beaver wrote:
> All I miss is documentation and PHP4 support.


There is no real need for documentation for PHPUnit2. Just grab any
JUnit tutorial you like and prepend the class names with
PHPUnit2_Framework, for instance (did I mention that I miss package /
namespace support in PHP 5?).

Once PHPUnit 2.0.0 is out, though, I plan on "porting" a tutorial from
JUnit / Java to PHPUnit2 / PHP.

> PHPUnit2 does have mock object support, but doesn't work in PHP4


PHPUnit2 will have MockObjects support (based on the JMock API), but I
have not started working on this yet.

--
Sebastian Bergmann
http://sebastian-bergmann.de/ http://phpOpenTracker.de/

Das Buch zu PHP 5: http://professionelle-softwareentwicklung-mit-php5.de/
Greg Beaver

2004-06-07, 3:58 pm

Sebastian Bergmann wrote:

> Greg Beaver wrote:
>
>
>
> There is no real need for documentation for PHPUnit2. Just grab any
> JUnit tutorial you like and prepend the class names with
> PHPUnit2_Framework, for instance (did I mention that I miss package /
> namespace support in PHP 5?).


Good to hear. This does simplify things.

No kidding - these are serious problems causing all kinds of headachey
hacks like the BC naming conventions, and arguments about package name
prefixes.

Greg
Tobias Schlitt

2004-06-07, 3:58 pm

Greg Beaver wrote:

[color=darkred]
> No kidding - these are serious problems causing all kinds of headachey
> hacks like the BC naming conventions, and arguments about package name
> prefixes.


I guess Greg meant this point. AFAIK Lukas is begging for
namespace/package support on the php-dev since quite a long time...

Maybe we should set a petition from the PEAR side to get that in 5.1 in
some way... only find one to implement that... :( My C experiences are
very, very low until now...

Regards,
Toby
--
Tobias Schlitt GPG Key: 0xA6529579
a passion for php http://www.schlitt.info
Stefan Neufeind

2004-06-07, 3:58 pm

On 7 Jun 2004 at 20:16, Tobias Schlitt wrote:

> Greg Beaver wrote:
>
>
>
> I guess Greg meant this point. AFAIK Lukas is begging for
> namespace/package support on the php-dev since quite a long time...
>
> Maybe we should set a petition from the PEAR side to get that in 5.1 in
> some way... only find one to implement that... :( My C experiences are
> very, very low until now...


Hehe, I doubt we'll have luck. But it would surely be very great for
PHP in general. So I'd definitely sign the petition :-)

Stefan
Martin Jansen

2004-06-07, 8:56 pm

On Mon Jun 07, 2004 at 07:0459AM +0200, Sebastian Bergmann wrote:
> Once PHPUnit 2.0.0 is out, though, I plan on "porting" a tutorial from
> JUnit / Java to PHPUnit2 / PHP.


I volunteer to merge this into the manual in case you don't want to mess
around with DocBook.

--
- Martin Martin Jansen
http://martinjansen.com/
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com