public function test_to_array() { $route = new Route([HttpRequestMethod::GET], 'foo', 'bar'); $route->setParameters(['foo' => 'bar']); $this->assertEquals(['methods' => [HttpRequestMethod::GET], 'path' => '/foo', 'handler' => 'bar', 'parameters' => ['foo' => 'bar']], $route->toArray()); }