BDD is not for control freaks 2

BDD is not for control freaks
Code coverage – it’s not good for you When I see people trying to embrace the concept of BDD, most of the time they will try to apply on it everything that they’ve learned in TDD.  Remember though that BDD is in fact TDD but done right – so stop dragging along all the bad habbits ...

Pitfalls of mocking 4

Pitfalls of mocking
DISCLAIMER: The problem described below has been fixed by the mocking framework Prophecy. Thank @_md and @everzet on Twitter. Lately I’m doing some quite extensive specing with PHPSpec. Of course when you do BDD or TDD you always have to mock your dependencies. Mocks can be very effective but they have a serious flaw which ...

Behat with Propel performance tip

Behat with Propel performance tip
Lately I’m writting a REST API and since I have converted fully to BDD there is nothing better then Behat to describe my features for the API. So having that said I noticed that there is some serious memory leaking when you use Propel 1.6 with Behat. All the scenarios are executed in one process ...

PHPSpec – How I’ve stopped testing and started specifying 3

PHPSpec - How I've stopped testing and started specifying
Probably like most of you reading this post I’m a PHP developer that was deeply into TDD. Some time ago I’ve felt in love with the BDD concept and a tool called Behat. My work made sense on the level that I’ve finally was able to get in the software’s beneficient role. Behat gave me ...

Symfony 2 Bundle for Last.fm API

Symfony 2 Bundle for Last.fm API
What I was thinking for some time now was writting my own Symfony 2 Bundle. I had some ideas what I want to do and one of them was to implement the Last.fm API. I found a bundle for that but it was written in a messy way and there were only methods concerning albums. ...

Deleting records from big data tables in MySQL

Deleting records from big data tables in MySQL
Selecting records to remove The issue with big data tables is that you can’t easily perform simple queries like deleting a couple of records without exceeding either time or memory. You can encounter those problems both on MySQL side or PHP/Apache side. If there are a lot of records involved, you will want to push ...

How to motivate developers to write tests

How to motivate developers to write tests
When introducing test driven development to programmers that don’t have a good grip of it and don’t really feel the need to wite tests, there are a couple of things that you should keep in mind. Here are some ideas that helped me change my friends minds from “just do it” to “test first” approach. ...

Preparing for PHP ZCE exam : Passing the exam ! 2

Preparing for PHP ZCE exam : Passing the exam !
I hope that the series of “Preparing for PHP ZCE exam” helped you to learn for the exam itself . As for me I have successfully passed the exam on 25th of April 2012. This is just a short note that I would like to share with all people reading my series of articles. The ...

Preparing for PHP ZCE exam : Chapter #10 Web Features

Preparing for PHP ZCE exam : Chapter #10 Web Features
This is one of the easy chapters that everyone should be well familiar with. So just refresh your memory on this one because it may earn you some easy extra points in the exam. This is as well the final chapter of the PHP ZCE exam preparation. Sessions This is a part that describes what ...

Preparing for PHP ZCE exam : Chapter #9 Security

Preparing for PHP ZCE exam : Chapter #9 Security
This is probably the hardest chapter of the exam and one that is strongly emphasized. Configuration & Installation Read all about installing PHP as CGI binary or as an Apache module, which is most likely the way you have done it usually. It is crucial to understand the way how the redirect mechanism works. The ...