public function testError() { PageModel::Error(); $this->expectOutputString("Error"); PageModel::Error("1213"); $this->expectOutputString("ErrorError<br><br>1213"); }
<?php include_once '../../core/init.php'; $Lead = new LeadModel(array('google' => $google, 'twilio' => $twilio, 'DBconfig' => $DBconfig)); if ($Lead->Complete()) { if (!$Lead->Save()) { PageModel::Error($Lead->error); } else { PageModel::Success($Lead); } } else { PageModel::Error("Incomplete"); }