function testCannotSaveWithInvertedInterval() { try { $expected_record = array('uid' => $this->expected_uid, 'jobid' => $this->expected_jobid, 'start_time' => 1308829978, 'end_time' => 1308825379); $mapping = new TZUserJobMapping($expected_record); $mapping->setDBWrapper($this->dbWrapper); $mapping->save(); $this->fail('should have received validation exception'); } catch (TZDBValidationException $e) { $expected_errors = array(t('Inverted interval')); $this->assertEquals($expected_errors, $e->getErrors()); } }