News Feed
Jobs Feed
Sections



Recent Jobs

News Archive
feed this:

Padraic Brady's Blog:
The Mockery An Independent Mock Object and Stub Framework for PHP5
March 06, 2009 @ 10:28:58

Noting the lack of a good, independent library for creating Mock Objects for unit testing PHP scripts, Padraic Brady (with assistance from Travis Swicegood) has come up with a standalone Mock Object and Stub framework - Mockery.

It's not tailored specifically to any one testing framework, rather it's an entirely separate framework with a discrete API. The idea is that you can use this framework within PHPUnit, or SimpleTest, or anything else really, without being forced to rely on the built-in support (if any) that test framework provides. Mockery was designed specifically to implement a form of Domain Specific Language (DSL). It makes extensive use of a fluent interface mixed with methods to approximate plain English.

He includes an overview of what Mock Objects and Stubs are and how to set them up with the Mockery tool. He finishes things off with a look at the Mockery and Mock Object Expectation APIs. You can grab this first release either as a PEAR package or from its github page.

0 comments voice your opinion now!
mockery php5 stub testing unittest object simpletest phpunit standalone



Vinu Thomas' Blog:
PHP Compiler - Roadsend
April 24, 2007 @ 08:37:00

On his blog today, Vinu Thomas looks briefly at one of the compiler options for PHP developers - the Roadsend Compiler.

Finally an open source PHP compiler ! Roadsend was perviously available as a commerical compiler for PHP with prices starting from $129. They seem to have shifted to the OSS model recently, giving free professional licence to their older compiler while they're working on releasing the precompiled versions of their open source code base.

He also links to a community site that offers the latest news about the project, some good places to start if you're just picking it up, and the timeline/roadmap for how things will progress.

0 comments voice your opinion now!
compiler roadsend standalone community php4 compiler roadsend standalone community php4


DevShed:
A Basic Monitoring Engine in PHP
September 14, 2006 @ 13:44:19

Continuing on in their series of working with stand alone PHP scripts, DevShed has posted this third and last part looking at the creation of a basic script you can use to monitor your server (an excerpt from Advances PHP Programming by George Schlossnagle).

Last week, we continued our discussion of PHP standalone scripts with child processes and more. This week, we conclude our discussion and bring together what you've learned.

They start with the creation of a very basic daemon, including permission restrictions. They then modify this heavily to support the monitoring of processes through various parameters like frequency, status_time, and a description of the service. They then create the full example script and show the usage by checking to see if a URL passed in can be opened.

They also include, as a bonus, another more useful script that will email someone when the specified service goes down (still a HTTP check, though).

0 comments voice your opinion now!
part3 standalone script monitoring engine email http request part3 standalone script monitoring engine email http request


DevShed:
Managing Standalone Scripts in PHP
September 07, 2006 @ 16:19:52

DevShed continues their look at standalone PHP scripts (server-side scripting, not on the web) in part two, "Managing Standalone Scripts in PHP" excerpted from the book "Advanced PHP Programming" from George Schlossnagle.

Last week, we began our discussion of PHP standalone scripts. This week, we'll be talking about child processes, shared resources, signals, and writing daemons.

They jump right in, going first for a look at forking off child processes from the script using the pcntl functionality you'll need to build into PHP. Resource management is key to working with server scripts, and they show you how to close them out when you're through. Next up is a brief look at the types of signals that you can send to the child processes, and some good rules to follow for writing daemons in PHP.

0 comments voice your opinion now!
standalone script serverside daemon signal resources standalone script serverside daemon signal resources


DevShed:
Implementing with PHP Standalone Scripts
August 31, 2006 @ 10:46:37

DevShed has posted an excerpt from the book "Advanced PHP Programming" from George Schlossnagle as this new tutorial detailing the creation of standalone PHP scripts.

If you've ever been interested in making significant use of PHP outside of a web environment, this article will show you how. The first of three parts.

This chapter describes how to reuse existing code libraries to perform administrative tasks in PHP and how to write standalone and one-liner scripts. It gives a couple extremely paradigm-breaking projects that put PHP to use outside the Web environment.

In this first part, they groundwork is laid - they introduce the CLI interface PHP already has and show how to handle input/output and work with parsing the command line arguments passed in.

0 comments voice your opinion now!
standalone script tutorail book excerpt advanced standalone script tutorail book excerpt advanced



Community Events





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


custom unittest test opinion interview series release community manifesto framework development introduction symfony2 api phpunit podcast application language package conference

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