How to install and configure automated tests using PHPUnit, Selenium and Xvfb, on CentOS

This entry explains how to install and set-up automated tests, using PHPUnit, Selenium and Xvfb on CentOS Linux.

PHPUnit is a unit testing framework. Selenium is a testing framework for web applications, which can record and playback tests, relying on browsers to perform these tasks. Most servers do not have an instance of the X Window System, in order to open a browser. To avoid installing the heavy-weight packages required for it, we can use the X virtual framebuffer, which renders all the graphical operations into memory; thus, reducing the memory footprint.

Continue reading How to install and configure automated tests using PHPUnit, Selenium and Xvfb, on CentOS

Notes on PHP Design Patterns, Part 2: Patterns for Performing And Representing Tasks

In a previous notes entry I wrote about patterns used for Generating Objects, and facilitating Flexible Object Programming. In this entry I am writing about patterns used for Performing and Representing Tasks. Continue reading Notes on PHP Design Patterns, Part 2: Patterns for Performing And Representing Tasks

How to download and convert Youtube videos to mp3, in Ubuntu Linux

This post describes how to download and convert Youtube videos to mp3, in Ubuntu Linux. Please note that this is not an encouragement to copyright infringement, I use these tools for downloading and listening to videos on my long commute with the London Underground, where no GSM or Wifi signal are available.

Continue reading How to download and convert Youtube videos to mp3, in Ubuntu Linux

Notes on PHP Design Patterns, Part 1: Generating Objects and Flexible Object Programming

Design patterns are streamlined solutions to common problems. They provide guidelines that can be translated into code. This entry will focus on patterns used for Generating Objects and Flexible Object Programming; presenting the problem, solution and basic examples. The structure relies on Matt Zandstra's second edition of 'PHP Objects, Patterns, and Practice', the 'ZEND PHP 5 Certification STUDY GUIDE', Jack D Herrington's IBM Developer Works 'Five common PHP design patterns' as well as various other sources referenced at the bottom of this page.  

Continue reading Notes on PHP Design Patterns, Part 1: Generating Objects and Flexible Object Programming