Skip to main content


Showing posts from September, 2011

Pfcongres 2011 wrap up

This Saturday I started early to go to Pfcongres, a small PHP community conference in Utrecht organized by the Dutch PHP user group PHPFreakz and after about two hours driving I arrived about half an hour in time before the conference started, with me kick starting with my keynote "Community Works", a 199 slide deck explaining what the PHP community is and how people can be part of that community.

My keynote was well received by the audience, although some comments were made it needed a more elegant flow of community tips. It even started a discussion whether I should use visuals or not to emphasize my words. I will take these comments into consideration when I'm reviewing these slides.

Although I spend a major part of the conference in the so-called "Hallway tracks" I was able to jump into a couple of great talks that have intrigued me to look into their details. A couple of tracks that really stood out were "SPL Data Structures and their Complexity" …

Quality Assurance on PHP projects - PHPUnit lessons learned

This is what I like about the PHP community: people work out similar ideas and share what they've learned in the process. Sometimes people pick up ideas and work them out, sometimes people just continue the conversation.

And I believe Lars Tesmer has done the latter, where he blogs on testing PHPUnit itself and the lessons learned in that process.

Thank you Lars for sharing your lessons.

Quality Assurance on PHP projects - PHPUnit part 4

In parts one, two and three we focussed on writing tests for a game of tic-tac-toe, with in parts two and three we optimized our tests so they focus on the functionality of the individual parts Grid and Player, with a collection class Players to handle Player objects.

In this fourth part we should focus on playing the game. Let's go over the steps again:

each player chooses a symbolfor each turn (max 9 turns)
a player places his symbol on the gridif 3 symbols appear in a single row (horizontal, vertical or diagonal)player is a winner So this is a simple and a straightforward rule we can turn into code. But let's look at the tests we've written in part 1 to see if they're still valid.
public function testGameCanBePlayed() { $playerX = $this->_ttt->getPlayers()->seek(0)->current(); $playerO = $this->_ttt->getPlayers()->seek(1)->current(); $this->assertFalse($this-&…