/** * @expectedException Exception * @expectedExceptionMessage Trying to save a file for a non saved survey. */ public function test_save_xls_null_sid() { $data = array('title' => 'A survey'); $survey = new Survey_entity($data); $survey->save_xls(NULL); }