public setControllerName ( string $controllerName ) : void | ||
$controllerName | string | Name of the controller |
return | void |
public function setControllerName($controllerName)
{
if (!is_string($controllerName)) {
throw new Exception\InvalidControllerNameException('The controller name must be a valid string, ' . gettype($controllerName) . ' given.', 1187176358);
}
if (strpos($controllerName, '_') !== false) {
throw new Exception\InvalidControllerNameException('The controller name must not contain underscores.', 1217846412);
}
$this->controllerName = $controllerName;
}
/** * @test * @param mixed $invalidControllerName * @dataProvider invalidControllerNames * @expectedException \Neos\Flow\Mvc\Exception\InvalidControllerNameException */ public function setControllerNameThrowsExceptionOnInvalidControllerNames($invalidControllerName) { $this->actionRequest->setControllerName($invalidControllerName); }