News Feed
Sections




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

Wojciech Sznapka's Blog:
Fully isolated tests in Symfony2
June 15, 2011 @ 11:18:49

Wojciech Sznapka has a new post to his blog today looking at his creation of fully isolated tests as a part of a Symfony2 application. He talks about two issues he recently solved with testing services in this popular framework.

The most important thing you should provide with your re-usable bundles is unit tests set. Lately I solved two major cases which Symfony2 hasn't got out of the box: testing services, defined in Dependency Injection Container and running model tests with fixtures in fully isolated environment.

He includes code snippets for both solutions - a BaseTestClass for working with dependency injection testing and a ModelTestCase class that, in the setUp(), loads in the required fixtures so the test can be completely isolated.

0 comments voice your opinion now!
symfony2 isolated unittest dependencyinjection fixtures doctrine2


blog comments powered by Disqus

Similar Posts

MaltBlue.com: Why Testing Makes a Project Successful and You Canít Afford to Deny It

QaFoo.com: Mocking with Phake

Fabien Potencier's Blog: Create your own framework... on top of the Symfony2 Components (part 7)

ZendCasts.com: Unit Testing Doctrine 2 Entities

Lukas Smith's Blog: Symfony2 community pushing the PHP ecosystem


Community Events





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


threedevsandamaybe developer bugfix series configure wordpress introduction podcast project code interview release application framework library list laravel language community api

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