protected function setParams(array $params = array()) { $newParams = array(); foreach ($params as $param) { $newParams[$param->getName()] = $param; } $this->paramReader->expects($this->any())->method('read')->with(new \ReflectionClass(ClassUtils::getClass($this->controller[0])), $this->controller[1])->willReturn($newParams); }