Skip to content

Instantly share code, notes, and snippets.

@clemherreman
Created November 14, 2014 10:37
Show Gist options
  • Save clemherreman/27ebeae67d9ed0a70877 to your computer and use it in GitHub Desktop.
Save clemherreman/27ebeae67d9ed0a70877 to your computer and use it in GitHub Desktop.
Wtf
<?php
class FailTest extends \PHPUnit_Framework_TestCase
{
public function testfail()
{
fail();
$this->assertTrue(true);
}
}
function fail()
{
try {
array_filter( array(1, 2, 3, 4),
function ($n) {
if ($n == 2){
throw new \Exception('Plante batard');
}
}
);
} catch (\Exception $e) {
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment