events + phpunit tests