Sebastian Bergmann »
27 February 2008 »
in PHP »
Dynamic Languages World Europe is the first European conference dealing with the shared concepts and frameworks of all important dynamic languages.
I will present two sessions at DLW Europe, one on Hamcrest, a project that originated in the Java community and is now being ported to more dynamic languages, and one on PHP's object model.
Hamcrest: A Cross-Language Library of Matchers
The Hamcrest Project provides a library of matcher objects (also known as constraints or predicates) allowing "match" rules to be defined declaratively in Java, PHP, and Python, to be used in other frameworks.
Typical usage scenarios on Hamcrest include testing frameworks, mocking libraries and UI validation rules.
This session, held by the creator of PHPUnit and the developer of hamcrest-php, will introduce the audience to Hamcrest and show how it integrates with mocking libraries such as JMock and testing frameworks such as JUnit and PHPUnit.
Understanding the PHP Object Model
Initially designed for "simple" Web programming, PHP has developed to a general-purpose object-oriented language making strong inroads into large-scale, business-critical Web systems. As of version 5 the PHP language features an object model that is similar to the ones of Java and C# and integrates ideas from other programming languages.
This talk will give an overview of PHP's object model, covering both basic OOP concepts such as interfaces, classes, and objects as well as PHP's “magic” interceptor methods.
See you in Karlsruhe, May 26-28 2008!
Sebastian Bergmann »
22 February 2008 »
in PHPUnit »
Moff Jerjerrod: "
Lord Vader, this is an unexpected pleasure. We are honored by your presence..."
Darth Vader: "
You may dispense with the pleasantries, Commander. I'm here to put you back on schedule."
Moff Jerjerrod: "
I assure you, Lord Vader. My men are writing tests as fast as they can."
Darth Vader: "
Perhaps I can find new ways to motivate them."
Sebastian Bergmann »
21 February 2008 »
in Events »

At this year's edition of the Dutch PHP Conference I will give a full-day tutorial on PHPUnit, Selenium RC, and phpUnderControl:
Quality Assurance for PHP Projects
Now that we know how to build PHP applications that "just work", are fast and scalable, as well as secure, the next logical step is to implement processes and use techniques that help us assure that the software works correctly throughout its entire lifecycle, from design to deployment to maintainance.
Attendees of this tutorial will learn how to effectively leverage tools such as PHPUnit and phpUnderControl to develop and test their PHP applications as well as to constantly measure the relevant metrics for software quality.
During the main conference, I will present a session on PHPUnit:
PHPUnit 3.3 Highlights
After a short introduction to PHPUnit and the topic of unit testing, this presentation, held by PHPUnit's creator, will highlight both basic and advanced features of PHPUnit with a focus on new (in PHPUnit 3.3) as well as "under-advertized" features.
The audience will see annotations, behaviour-driven development, code coverage, and other features in action.
See you in Amsterdam, June 13-14 2008!
Sebastian Bergmann »
21 February 2008 »
in Announcements »
- Fixed #396: *AndWait commands behave odd in SeleniumTestCase. [2500]
Sebastian Bergmann »
20 February 2008 »
in PHP »
When testing PHP code that uses
PDO to connect to a database, it makes sense to keep your SQL compatible with
SQLite. The fact that no inter-process communication with a server takes place (as there is no SQLite server) and SQLite's ability to store databases in memory minimizes the overhead incurred by the database.
| | User | System | CPU | Total |
|---|
| PDO / MySQL | 3.95s | 0.87s | 40% | 12.046s |
|---|
| PDO / SQLite (file) | 5.01s | 1.54s | 63% | 10.359s |
|---|
| PDO / SQLite (memory) | 3.16s | 0.68s | 99% | 3.849s |
|---|
The benchmark data above has been collected by running 200 test cases that all perform
CREATE TABLE,
INSERT,
UPDATE,
DELETE,
SELECT, and
DROP TABLE queries against
mysql://test@localhost/test,
sqlite:///tmp/db, and
sqlite://:memory: databases, respectively.