public function testEntityIdentifierCanNotBeUpdated() { $this->setExpectedException('RuntimeException', 'ID already set'); $entity = new ClassTest(); $entity->setId(1); $entity->setId(2); }