News Feed
Jobs Feed
Sections

Recent Jobs

News Archive
Ibuildings Blog:
Zend Framework testing emulating HTTP calls
August 29, 2008 @ 15:26:55

On the Ibuildings blog today Lorenzo Alberton takes a look at the Zend Framework, specifically as to how it can mimic regular HTTP calls with the built-in components.

One of the unit testing best practices suggests to break dependencies, so you can test each component separately. The first problem that arises when you want to test controllers might be having a tighter control over the HTTP Request and Response objects.

This problem is overcome with the Zend_Test_PHPUnit_ControllerTestCase. The second problem it with calls to external resources (like models/databases or web services). This is the prime focus of the post and seceral blocks of code are included to make a class to emulate the HTTP responses you might get back from the service.

0 comments voice your opinion now!
zendframework testing http call webservice model unittest



Similar Posts

Evan Sims' Blog: Web APIs by Example, Part I: Twitter

Ilia Alshanetsky's Blog: PHP 5.2.0 RC4 Released!

Debuggable Blog: How to paginate a CakePHP search over a HABTM relation without hacking the core

Lee Blue's Blog: How To Implement A Ruby on Rails style before_filter With The PHP Zend Framework

Tony Bibbs' Blog: Book Review: Pro PHP


Community Events









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


release job cakephp code package developer PEAR database example zendframework PHP5 conference ajax mysql framework releases application book zend security

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