 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
PHPBuilder.com: Create a Unit Conversion Application w/the Zend_Measure Component
by Chris Cornutt February 15, 2010 @ 09:38:22
On PHPBulder.com there's a new tutorial posted showing you how to create an application that can do unit conversion with the help of the Zend_Measure component of the Zend Framework.
Performing even relatively simple conversion calculations such as from pounds to kilograms from memory can be fairly difficult, let alone calculating more esoteric conversions such as from square meters to acres. To automate this conversion process, I used the Zend Framework to create a calculator capable of easily migrating data among the most commonly used formats.
Zend_Measure lets you define the type you want to convert from and convert to based on some constants included with the component. A simple call to the "convertTo" method and you'll get your answer. Based on this he creates a simple calculator and shows you can can integrate roman numeral support in as well.
voice your opinion now!
unit convert zendframework zendmeasure tutorial
Symfony Project: Book preview read the Unit Tests chapter
by Chris Cornutt January 19, 2007 @ 11:44:00
With unit testing becoming more and more prevalent in development of online applications (especially PHP), it's good to see some of the frameworks giving their users as much information as possible. The symfony project has done just that as a part of a larger book on the framework.
You're probably curious to see if what we wrote in this book is really helpful and practical. So we decided to offer you a sample of the book, in PDF format, and that's precisely Chapter 15 about units and functional tests.
To check out this sample chapter from thei upcoming book (the chapter on unit testing), download it here or just grab 0 comments voice your opinion now!
symfony book sample chapter unit test apress framework symfony book sample chapter unit test apress framework
DevShed: Graphical Interfaces and Unit Testing
by Chris Cornutt November 02, 2006 @ 11:57:00
In the final part of their series looking at unit testing in PHP, DevShed has this new tutorial that looks at using graphical interfaces with the unit tests you've already generated. It's another excerpt from the George Schlossnage book "Advanced PHP Programming".
Because PHP is a Web-oriented language, you might want an HTML-based user interface for running your unit tests. PHPUnit comes bundled with this ability, using PHPUnit_WebUI_TestRunner::run(). This is in fact a nearly identical framework to TextUI; it simply uses its own listener to handle generate HTML-beautified output.
He looks at test driven design, a simple "Flesch Score Calculator" class, testing a "Word" class (with PHPUnit), and creating the Bug Report of the output of it all. Finally, he builds up a simple web interface to make running the tests and getting the reports nice and easy.
voice your opinion now!
tutorial unit test graphical interface phpunit web tutorial unit test graphical interface phpunit web
DevShed: Unit Testing in Detail
by Chris Cornutt October 26, 2006 @ 09:58:00
Continuing in their effort to help PHP developers keep their code bug-free, DevShed has posted part two of the series looking at unit testing your applications. Previously they had looked at the basics - of they work and what they're for. This time, they dig a little deeper, showing some of the additional features and conditions that PHPUnit has to offer.
This week, you will learn about running multiple tests simultaneously, creating more informative error messages, and more.
They get back into something they mentioned briefly before - packaging tests in a separate archive to keep it out of the main body of code (the same way separating content and display functionality is good). They also talk about how to run more than one test at the same time, a handy feature that lets you make regression tests.
They also show how to create more informative error messages and how to manually add more testing conditions for you to check custom bits of code that don't quite fit with the assertNull, assertEquals, and assertFalse crowd.
This article is an excerpt from the Sams Publishing book "Advanced PHP Programming" by George Schlossnagle.
voice your opinion now!
tutorial unit testing additional features test conditions add tutorial unit testing additional features test conditions add
|
Community Events
Don't see your event here? Let us know!
|