Testing Method for PHP code - zend.com

Status
Not open for further replies.

office politics

It's all just 1s and 0s
Messages
6,555
Location
in the lab
An Introduction to the Art of Unit Testing in PHP

padraic | 11 comments | Monday, December 3, 2007
.

Introduction
Testing is an essential aspect of developing in any programming language. If you don't test your source code then how can you verify it works as expected? Manual testing can only be performed irregularly and usually only in limited ways. The answer to testing source code regularly, and in depth, is to write automated tests which can be frequently executed. In PHP such tests are usually written using a unit testing framework, a framework which allows the source code of any application or library to be tested as isolated units of functionality such as a single class or method. As unit testing has gained popularity, it has become a standard practice in PHP with libraries and frameworks such as Swiftmailer, the Zend Framework and Symfony all requiring unit test coverage of their source code.

Unit Testing is often seen as an arcane, time consuming task - which it sometimes can be! But the point of spending time writing tests is to improve the quality of your source code so it has fewer overall bugs, many of which are detected early, a continual testing process to prevent new changes from changing the behaviour of older code, and to provide confidence that your code can be depended on. There are other benefits too, and we'll detail these later.

i saw a job posting that required exp with unit testing. so i'd thought id look into it. it think this article is a good read about it




edit - just found a video tutorial for phpunit

http://www.internet.com/Video/?bcpid=86842592001&bclid=87185324001&bctid=793834242001
 
Status
Not open for further replies.
Back
Top Bottom