PHPUnit: contains vs. stringContains

Note to myself: If I ever see that error again when running PHPUnit tests

Invalid argument supplied for foreach()

phar://C:/Program Files (x86)/PHPUnit/phpunit.phar/PHPUnit/Framework/Constraint/TraversableContains.php:110
phar://C:/Program Files (x86)/PHPUnit/phpunit.phar/PHPUnit/Framework/Constraint.php:82
phar://C:/Program Files (x86)/PHPUnit/phpunit.phar/PHPUnit/Framework/Constraint/And.php:113

please remember that $this->contains() is not the same as $this->stringContains(). The first one is a constraint for arrays, the second one is for strings.

Welcome to the Blog

Hello everybody!

My name is Christian, I’m a developer from Berlin/Germany. Primarly I’m programming in PHP but I’m open to any kind of programming language or web technology as long as it can do the job. When creating PHP applications I prefer using the Symfony2 framework, which is why most of my blog will be related to it and the so called “Symfony ecosystem”.

This blog will be about my experience with new technologies and the lessons learned, so people like you can benefit from it. I guess it will be updated on a non-regular basis, that means it just happens when I’ve found a new technology or had a experience worth sharing. I already got some topics scheduled but I have to write them first 😉