News Feed
Jobs Feed
Sections




News Archive
feed this:

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

Zumba Engineering Blog:
Mocking Singleton PHP classes with PHPUnit
November 26, 2012 @ 09:51:04

On the Zumba Engineering blog today Chris Taylor has a new post about mocking in PHPUnit, specifically how to handle those pesky Singleton methods lurking around your codebase.

In many of our projects, utilities and vendor classes are implemented with a singleton pattern. [...] In this post, we'll cover a nice way to inject a PHPUnit mock object for use in testing methods that utilize singleton classes.

He starts by introducing mocking and how to use mock classes in PHPUnit with a simple "sayHello" example. Adding on another layer, he creates a "SomeclassMock" class, defining its own "expects" and "cleanup" methods. This class forces the Singleton method to act more like a regular non-static method and "resets" it after each use.

0 comments voice your opinion now!
mocking phpunit class singleton expects cleanup tutorial


Richard Thomas' Blog:
ZF please before you go 2.0 gunho please clean out the attic
January 28, 2010 @ 12:20:21

Richard Thomas has a suggestion for the Zend Framework development group - clean out the attic before you hit the 2.0 mark.

A big focus of 2.0 it seems is going to be performance and cleaning up the structure to make use of php 5.3 features which is great, I have been preaching the need for ZF to start taking performance as a real concern for a while now. On the other hand they have gotten to a certain point that they need to reflect on what they already have and not let the spiderwebs grow to large.

Richard points out that the Zend Framework, which has a focus on being a "business-class framework" and having the best to offer, has quite a few parts of it that are older and aren't well maintained. This sort of thing could cause some big problems down the line and could even cause some doubt over the developer's choice of frameworks.

1 comment voice your opinion now!
zendframework opinion cleanup maintenance


SDA Asia:
Yahoo Helping Zend with PHP 6, says Andi Gutmans
July 21, 2006 @ 05:33:28

According to this post on the SDA Asia site today, Andi Gutmans is quoted as saying that Yahoo is doing their share in helping PHP6 come along that much faster.

Yahoo is Helping Zend with PHP 6, says Andi Gutmans co-founder and vice president of technology at Israeli-based company Zend Technologies, in an interview with Stephen Shankland of c|net news. PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML.

They mention what PHP6 will be and include a link to the (oldish) meeting notes concerning it. Be sure to check out the comments for some interesting questions...

0 comments voice your opinion now!
yahoo help php6 zend cleanup apc oop unicode yahoo help php6 zend cleanup apc oop unicode



Community Events











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


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

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