custom exception class enabling exception handling in phpunit