Skip to content

Instantly share code, notes, and snippets.

@clemherreman
Created May 10, 2011 15:35
Show Gist options
  • Save clemherreman/964697 to your computer and use it in GitHub Desktop.
Save clemherreman/964697 to your computer and use it in GitHub Desktop.
Unit testing exceptions
<?php
$t->diag('->run()');
$message = "->run() lance une exception si le BatchDownload n'est pas initialisé";
try
{
$bd->run();
$t->fail($message);
}
catch (Exception $e)
{
$t->pass($message);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment