/** * Set the navigation mode of the Test Part. * * @param int $navigationMode A value of the Navigation enumaration. * @throws InvalidArgumentException If $navigation mode is not a value from the Navigation enumeration. */ public function setNavigationMode($navigationMode) { if (in_array($navigationMode, NavigationMode::asArray())) { $this->navigationMode = $navigationMode; } else { $msg = "'{$navigationMode}' is not a valid value for NavigationMode."; throw new InvalidArgumentException($msg); } }