News Feed
Jobs Feed
Sections

Recent Jobs

News Archive
feed this:

Sebastian Bergmann's Blog:
Global Variables and PHPUnit
June 17, 2008 @ 08:49:19

Sebastian Bergmann has a new post today about a feature of the PHPUnit unit testing tool that has the possibility of breaking when objects are introduced - backing up the globals.

It is hard to test code that uses singletons. The same is true for code that uses global variables. Typically, the code you want to test is coupled strongly with a global variable and you cannot control its creation. An additional problem is the fact that one test's change to a global variable might break another test.

You can disable the backup option if you'd like by setting the $backupGlobals option in your test to false. This lets PHPUnit know that you want to leave the globals (and superglobals) alone during the run.

0 comments voice your opinion now!
global variable phpunit unittest backup global superglobal test disable



Inside Open Source:
WordPress Tip #873 Disabling Caching During Development
February 28, 2007 @ 07:38:00

On the Inside Open Source blog today, there's a "quick hit" post from Jason Gilmore for WordPress users out there using the WP-Cache and being frustrated by it's functionality during the development process.

I'm using WordPress to build out a blog for a new endeavor, and couldn't figure out why I had to go through a rather unwieldy refresh process (disabling a template and then enabling it anew) every time I changed it from within the WordPress administration interface.

It was the WP-Caching mechanism that WordPress comes with that was causing the issue, so he tracked down where to disable it for the duration of the development time. (Options -> WP-Cache -> Disable It).

0 comments voice your opinion now!
caching development wordpress wpcache options disable caching development wordpress wpcache options disable



Community Events







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


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

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