Tag: Testing

Clean Architecture: UseCase tests

When creating an application that follows The Clean Architecture you end up with a number of UseCases that hold your application logic. In this blog post I outline a testing pattern for effectively testing these UseCases and avoiding …

Yield in PHPUnit data providers

Initially I started creating a general post about PHP Generators, a feature introduced in PHP 5.5. However since I keep failing to come up with good examples for some cool ways to use Generators, I decided to do …

OOP file_get_contents

I’m happy to announce the immediate availability of FileFetcher 4.0.0. FileFetcher is a small PHP library that provides an OO way to retrieve the contents of files. What’s OO about such an interface? You can inject an implementation …

PHP Unconference Europe 2016

Last week I attended the 2016 edition of the PHP Unconference Europe, taking place in Palma De Mallorca. This post contains my notes from various conference sessions. Be warned, some of them are quite rough. Overall impression Before …

I T.A.K.E. 2016

Last week I attended the I T.A.K.E. unconference in Bucharest. This unconference is about software development, and has tracks such as code quality, DevOps, craftsmanship, microservices and leadership. In this post I share my overall impressions as well …

5 ways to write better mocks

In this post I share 5 easy ways to write better mocks that I picked up over the years. These will help you write tests that break less, are easier to read, are more IDE friendly, and are …

MediaWiki testing with PHPUnit

I figured having some unit tests for Maps, the MediaWiki extension to work with geographical data and display it by embedding dynamic maps into your articles, would be beneficial to it’s quality. It’s pretty hard to try cover …

Zend Server for more awesomeness

About a year back I decided I had to change my development environment from working on a remote server with a simple text editor to something more solid, if I wanted to do serious PHP development. I went …