public function testInsertBadTimeperiod() { /* Test exception unique */ $this->setExpectedException('PDOException', '', 23000); $newHost = array('timeperiod_tp_id' => 42, 'host_name' => 'Test host', 'host_alias' => 'Test host', 'host_address' => '192.168.1.3', 'display_name' => 'Test host', 'host_comment' => 'Testing host', 'organization_id' => 1); Host::insert($newHost); }