News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Sebastian Bergmann's Blog:
The Cost of Test Isolation - Follow-Up
January 20, 2009 @ 11:11:44

Adding on a bit more to a previous post of his look at test isolation (ex. global variables from one test do not effect any others') with an update he's made to the PHPUnit code concerning the isolation.

Since the previous posting, I have added a backup/restore mechanism for static attributes of classes to PHPUnit. This is yet another feature of PHPUnit that makes the testing of code that uses global state (which includes, but is not limited to, global and superglobal variables as well as static attributes of classes) easier.

Two graphs illustrate the difference - one showing a normal run and another with this new feature in use and showing off the performance increase it can give.

0 comments voice your opinion now!
test isolation phpunit xdebug backup restore static attribute


blog comments powered by Disqus

Similar Posts

Content with Style Blog: Unit testing controllers with Zend Framework

Padraic Brady's Blog: Unit Testing: Multiple Assertions And Lazy/Shallow Testing Are Evil

Sebastian Bergmann's Blog: Distributed Testing with PHPUnit 3.1

Sebastian Bergmann's Blog: RC2 Is The New RC1 (PHPUnit)

Matthew Weir O'Phinney's Blog: Getting XDebug working with PHPUnit for code coverage reports


Community Events

Don't see your event here?
Let us know!


extension community introduction unittest laravel interview laravel5 library php7 opinion podcast framework version development voicesoftheelephpant release api series language security

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework