'7', 'zid' => $zid); $view = 'zone'; $warnings = array(); set_error_handler(function($no, $str) use (&$warnings) { $warnings[] = $str; return true; }); try { require __DIR__.'/../../web/skins/classic/views/zone.php'; } catch (Throwable $e) { $warnings[] = $e->getMessage(); } restore_error_handler(); return array($view, $warnings); } list($view, $warnings) = run_view('99'); check('zone that is not found shows the error view', $view, 'error'); check('zone that is not found raises no warnings', $warnings, array()); echo "\n$passed passed, $failed failed\n"; exit($failed ? 1 : 0); }