News Feed
Jobs Feed
Sections




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

Test.ical.ly Blog:
Wrapping symfonys functional tests in a PHPUnit test case
July 08, 2010 @ 13:58:50

In a new post to the test.ical.ly blog Christian looks at how to wrap Symfony functional tests inside of a PHPUnit test case to unify them with your already-existing unit tests.

Yesterday I wrote a lot of functional tests for a symfony plugin that provides and XML web service interface. Using symfonys functional testing classes this is actually quite easy to do. But wouldn't it be cool if you could integrate these tests into your continuous integration service just like PHPUnit tests? Wouldn't it be cool to be able to generate PHPUnit coverage reports?

He created a simple PHPUnit test whose job it is to run all of the Lime tests (with a standard naming convention) and pull the results back into the test to be evaluated. An assertEquals checks the result to be sure the string "ok" is returned as the first thing on the line. If any of the functional tests fail, the whole test case will fail. It could be modified a bit to record which case it was that actually failed and report that back in the failure information.

0 comments voice your opinion now!
functional test symfony phpunit testcase tutorial


blog comments powered by Disqus

Similar Posts

Michelangelo van Dam's Blog: Quality Assurance on PHP projects - PHPUnit part 4

Shashikant Jagtap's Blog: Adding More Sauce To Behat

Phish Tank: Install & Configure Apache+PHP+ZendFramework+OracleDbXe On Windows In Minutes

Zend Developer Zone: Building AutoComplete Inputs with PHP, PEAR, Dojo and YUI

Jani Hartikainen's Blog: How to make your code testable


Community Events











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


hack facebook component opinion performance framework composer unittest symfony2 hhvm introduction release install series language podcast application package security database

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