Exemplo n.º 1
0
 /**
  * Tests whether addQueryParameters() works as expected.
  *
  * @dataProvider dataProviderTestAddQueryParameters
  * @return void
  */
 public function testAddQueryParameters($existingQueryParameters, $parametersToAdd, $expectedQuery, $expectedRawQuery, $expectedQueryParameters)
 {
     $uri = new Uri();
     $uri->setQueryParameters($existingQueryParameters);
     $uri->addQueryParameters($parametersToAdd);
     $this->assertSame($expectedQueryParameters, $uri->getQueryParameters(), 'getQueryParameters()');
     $this->assertSame($expectedRawQuery, $uri->getRawQuery(), 'getRawQuery()');
     $this->assertSame($expectedQuery, $uri->getQuery(), 'getQuery()');
 }