/** * @return void */ public function testToArray() { $url = new Url(['path' => '/foo/bar', 'query' => ['x' => 'y'], 'fragment' => 'z']); $expected = ['scheme' => null, 'user' => null, 'pass' => null, 'host' => null, 'port' => null, 'path' => '/foo/bar', 'query' => ['x' => 'y'], 'fragment' => 'z']; $result = $url->toArray(); $this->assertSame($expected, $result); }