public function testGetNameWhenParameterNameNotExists() { $container = new ParameterContainer(); $message = null; try { $container->getName('sort_field_'); } catch (Exception $e) { $message = $e->getMessage(); } $this->assertEquals('The parameter name with key "sort_field_" not exists', $message); }
/** * Sets the request data and adds the data to the parameter container * * @param array $data Request data * * @return Paginator */ public function setData($data) { $this->data = $data; $this->parameters->addParameters($data); return $this; }