Sebastian Bergmann's Blog: TestNG-style Grouping of Tests
691601
Sebastian Bergmann demonstrates another feature of the popular PHPUnit unit testing software in  new post to his blog, specifically the TestNG-style of test.   Starting with version 3.2, PHPUnit has support for TestNG-style @grouping of tests.   He includes an example of the style, a test case that, through the command line testing tool, can be called in portions depending on the need.
363699
Etienne Kneuss has an update on the PHPT Generator project posted to his blog, mentioning specifically how it was used to discover documentation problems in the generated phpt files.   The main use of those phpt files was to have an easy way to check examples used in the documentation. Along with a php script analyzing the results and Hannes' great testing environment, I was able to generate a summary of the examples failing.   The results show that over 50% of the documents passed the test, with the rest split between failing because of missing extensions (9%) and because of an error in the example (41%).
710008
Sebastian Bergmann points out a new feature that PHPUnit (the popular PHP unit testing tool) now has - parallel_test_execution allowing for each test to execute on a separate PHP process.   The advantages of this include full test isolation and the fact that a test can now cause a PHP fatal error or even a segmentation fault of the PHP interpreter without interrupting the test execution.   He does mention, however, that it can cause a bit more overhead for larger testing suites since it needs to create a new process (complete with memory usage) for each running test. There are also coding issues that could be thrown off by this option (he gives an example of an inheritance issue with eZ Components).     He also notes some of his thoughts on how to control/configure the process (like in a configuration file) and via an "@isolated" notation to make it easy to do it dynamically.
602187
Elizabeth Smith has posted about a new toy she received from the folks at Microsoft that adds in a missing piece of development functionality on Windows - code coverage and testing.   So this evening I managed to get PHPT running my tests (they're just basic .phpt tests but run-tests is..well flakey is a nice description some days) for my winapi php extension wrapped inside a "generic test" for Visual Studio. [...] So what did all this accomplish? I now can run my phpt tests through visual studio and collect code coverage on what theyÃ¢ÂÂre testing. Like GCOV, only for windows.   She's also included a screenshot of what the interface and results of the testing look like in the latest Visual Studio tool.
310656
Popular posts from PHPDeveloper.org for the past week:IBM developerWorks: PHP frameworks, Part 1: Getting started with three popular frameworksWeb Development Blog: Tutorial: FTP Upload via cURLJoey's Blog: 8 Practical PHP Regular ExpressionsJeff Moore's Blog: Keywords and Language SimplicityAlessandro Crugnola's Blog: AMFPHP and mbstringTravis Swicegood's Blog: Why Inheritance SucksStefan Mischook's Blog: Creating Custom PHP Functions Video Tutorial - Part 3Johannes SchlÃ¼ter's Blog: PHP 5.3 UpdateInternet Super Hero Blog: mysqlnd to support PDO, mysqlnd in PHP 5.3Jacob Santos' Blog: Object Oriented Programming Isn't Easy
139275
Popular posts from PHPDeveloper.org for the past week:PHP-Coding-Practices.com: Try-Catch Syntax WeirdnessPHPBuilder.com: Cross-Platform Database PHP DevelopmentIBM developerWorks: Java and PHP technology on AIX - Integrate the Java business application w/ DB2OpenSourceCommunity.org: What do you think makes a good CMS?Jonathan Snook's Blog: Elemental: Conditional Content with CakePHPDevShed: The Basics of Using the Factory Pattern in PHP 5Builder.com.au: PHP exploit code plants itself in GIFJohn Cox's Blog:  Linux.com Now PHP PoweredNick Halstead's Blog: Solving Programming ProblemsPHP-Tools Blog: Testing FIT
616165
The Zend Developer Zone has another new tutorial from Padraic Brady talking about testing your applications (i.e. unit tests). In this new article, he expands on his previous one and dives a bit deeper into the behaviour-driven development process.   In this article, I introduce a TDD related practice called Behaviour-Driven Development which has been gathering attention for over a year and gaining converts (like me!).   He briefly covers what BDD is and how it can be used to solidify code against issues that might come up down the road (and how it compares to test-driven development). Some sample code/tests are included to give you a better idea of how it all fits together - a set of scenarios for any given "story". True to the title, Padraic writes his tests around the construction of a Klingon Bird of Prey ship.
674304
Mike Wallner has thrown together some stats for the latest edition of the pecl/http package to test its response performance.   The results surprised me, because it clearly shows that the performance drop for starting the PHP engine and doing the neccessary negotiation to provide caching is not that bad.   There's a chart of the results as well as a full PDF with all of the stats the graph maps out. He includes the legend to make the graph easier to understand.
496780
Lorenzo Alberton has posted some updates about the PEAR packages that he maintains to his blog today including MDB_QueryTool, Mail_Queue2, MDB2, and Translation2.   Even if lately I've been coding way more in C/C++ than in PHP, I still keep an eye on PEAR developement: I reckon in the last month I've closed a bug a day, on average. And after my last call for help about my PEAR packages, I'm also pleased to announce that someone did indeed offer a hand. I'm happy to welcome not one, but two new developers!   Each of the items has links to their PEAR homepage and a few quick words on where the package stands (including developers involved or wanting to get involved). He also reminds developers out there that they can help out too if they want to jump in and get into PEAR.
743840
Chris Shiflett has posted his own recap of the (just passed) php|works conference up in Toronto over on his blog.   I've been traveling non-stop since php|works, so I haven't had a chance to reflect on the conference, what I learned, who I met, and things like that. (Zak has been doing a good job of this lately, and I'd like to follow his lead.) I've probably forgotten more than I remember, but this is my recap.   Included in the things he mentions are:  The people he was able to meet (like Joshua Eichorn and Sebastian Bergmann) The talks he gave ("Truth about XSS" and "Agile PHP Testing") His interview with Cal Evans of the Zend Developer Zone The PHP 5 Certification and Wez Furlong's "Not PDO" talk
695823
Travis Swicegood has made a new release of the successor to the PEAR RunTest package for PEAR2 - the new PHPT.    Since this is usable and PEAR2 is still being worked out, I've decided to release this as a standalone package for the time being with the intent of bundling it with Pyrus or including it directly in PEAR2 when PEAR2 is realized.   This provides the majority of the functionality provided by PEAR's pear run-tests command via its own phpt command and it can even provide pear style output.    Examples of its use are included as well as the method to download this latest version (via a PEAR channel, of course) or through the package's web page. Issues found with the software can be posted to the project's Google code page.
437494
Popular posts from PHPDeveloper.org for the past week:PHPClasses.org: A PHP killer feature - Streams abstractionRob Thompson's Blog: Switch vs. IfPHPEverywhere: Octopussy numbers in PHPJob Posting: MODE Visual Seeks PHP Developer (Charlotte, NC)ProDevTips.com: Why PHP as a templating language sucksMatthew Turland's Blog: The Yin and Yang of TypingStubbles Blog: Stubbles 0.5.0 releasedChristopher Jones' Blog: Updated connection pooling in PHP's OCI8 extensionBen Ramsey's Blog: Congrats Costa Rica PHP!Carsten Lucke's Blog: Configuration issues with Xdebug on Debian Etch
529386
Sometimes, it's just not enough to sit and try to teach theory about something in programming - it's better to just jump right in and take things as they come. That's what Harry Fuecks thinks, at least in his latest post on the SitePoint PHP Blog - a look at the "Joy of Regular Expressions".   He does go over a bit of the theory and why they are so invaluable, but it's a short section before he gets to the heart of the article - working with regular expressions for:  positive matching matching all instances in a given string finding an exact match matching the start of a string validation of the contents of a string checking the length of a string  There's simple examples included for each of the items to help you get an idea of how they'd work.
582158
Michael Kimsal points out the posting of the latest part of his "Grails for PHP developers" series to his blog site - Part Five of the series.   I've put up the latest installment in my "Grails for PHP developers".  Rather than delve too much more in to Grails head on, I'm taking this installment (and at least the next one) to delve more in to the Groovy language itself.  Groovy offers similarities to PHP, but also many differences which can trip you up if you're not careful.  I'll try to lay those out as best I can in the next couple of installments.   This new part of the series goes back and puts the spotlight on GRoovy, the base of the Groovy/Grails combo. He talks about working with variables and arrays as containers for multiple pieces of data and some possible gotchas that could come up along the way.
380092
Sebastian Bergmann asks a simple question in his latest post - "who uses PHPUnit?"   I am putting together a list of projects that use PHPUnit. The purpose of this list is not only to show who uses PHPUnit but also to provide a list of example test suites that are built using PHPUnit.   More specifically, he's looking for projects that use PHPUnit that isn't listed on this page. If you have a project or know of one that's using this popular unit testing suite, post a comment here to let him know.
38399
Beehive Code Now Available in Apache; XMLBeans Officially Approved as Apache Project
360849
On the Zend Developer Zone today, there's this new tutorial that looks at making the move from PHP4's object-oriented programming up to the "more complete obejct model of PHP5" - specifically with the Decorator design pattern.   While working on a project I realized one particular solution was a pretty good way to demonstrate the decorator design pattern together with some of PHP5's features, including abstract classes, interfaces, type hinting, the final keyword and the visibility of properties and methods. This article is intended for those of you who, like myself, are moving from object-oriented programming, including some use of design patterns, in PHP4, to the more complete object model of PHP5.   He sets up a scenario about the development of an online pizza ordering system to show how to "decorate" a pizza with each of the toppings on a list (instead of having to list out every pizza in every possible topping combination). Of course, all of the code is included and explained so you understand exactly what's happening. Finally, there's a demonstration of its usage - a simple call that grabs the stock level/name/cost of each of the items in stock (pizza combinations).