/** * return a new error object which has all options like $error except the $title overridden. * * @param \Neos\Error\Messages\Error $error * @param string $title * @return \Neos\Error\Messages\Error */ protected function setErrorTitle(Error $error, $title) { return new Error($error->getMessage(), $error->getCode(), $error->getArguments(), $title); }
/** * @test */ public function theConstructorSetsTheErrorMessageCorrectly() { $errorMessage = 'The message'; $error = new FlowError($errorMessage, 0); $this->assertEquals($errorMessage, $error->getMessage()); }