public function testToArray() { $array = $this->queryString->toArray(); $this->assertEquals($this->array, $array); $expected = $this->array; unset($expected['q9']); $this->queryString->set('q9', null); $this->assertEquals($expected, $this->queryString->toArray(true)); }
/** * Builds a URL with added/merged query parameters * @param array $queryParameters */ public function getUrlForMergedParameters($queryParameters) { if ($this->hasQueryString()) { $querystring = new QueryString($this->getQueryString()); $querystring->addParameters($queryParameters); $queryParameters = $querystring->toArray(); } return $this->getUrlForParameters($queryParameters); }