Skip to content

Instantly share code, notes, and snippets.

@iNamik
iNamik / PHPUnit_GenericException.php
Created December 15, 2012 19:20 — forked from anonymous/PHPUnit_GenericException.php
Generic Exception Support for PHPUnit < v3.7 - A full test suite is included.
<?php
/**
* Generic Exception Support for PHPUnit < v3.7
*
* These classes help you test generic exceptions in PHPUnit versions less than
* v3.7, avoiding the 'You must not expect the generic exception class' error.
*
* We create a new exception to represent the generic exception, and provide
* multiple ways to incorporate the functionality into your tests:
*