$test) { if ( ! is_callable($test)) { throw new \Exception("Test [$name] in suite [$suite] is not callable."); } static::$passed = ($result = call_user_func($test)) ? static::$passed + 1 : static::$passed; static::$results[$suite][] = array('name' => $name, 'result' => $result); } } /** * Get the test report view. * * @return View */ public static function report() { return View::make('test/report') ->bind('results', static::$results) ->bind('passed', static::$passed) ->bind('total', static::$total); } }