private function thenSaveShouldFail() { $e = null; try { $rm = $this->record->getRecordManager(); $rm->scheduleSave($this->record); $rm->commit(); } catch (Exception $e) { // see assert } $this->assertNotNull($e, 'record was saved: ' . print_r($this->table->createQuery()->fetchArray(), true)); }