public function testSetQueryArraySetsValue() { $url = 'http://example.com/path'; $uri = new URI($url); $expected = 'http://example.com/path?key=value'; $uri->setQueryArray(['key' => 'value']); $this->assertEquals('key=value', $uri->getQuery()); $this->assertEquals($expected, (string) $uri); }