public function testSetTypeWithInvalidTypeThrowsException() { try { $item = new LogItem('Test log title'); $item->setType(-1); } catch (Exception $e) { return; } $this->fail(); }