Returns an array with the Route match results.
public getMatchResults ( ) : array | ||
return | array | An array of Route Parts and their values for further handling by the Router |
/** * @test */ public function defaultValuesAreSetForUriPatternSegmentsWithMultipleOptionalRouteParts() { $this->route->setUriPattern('{key1}-({key2})/({key3}).({key4}.{@format})'); $defaults = ['key1' => 'defaultValue1', 'key2' => 'defaultValue2', 'key3' => 'defaultValue3', 'key4' => 'defaultValue4', '@format' => 'xml']; $this->route->setDefaults($defaults); $this->routeMatchesPath('foo-/.bar.xml'); $this->assertEquals(['key1' => 'foo', 'key2' => 'defaultValue2', 'key3' => 'defaultValue3', 'key4' => 'bar', '@format' => 'xml'], $this->route->getMatchResults(), 'Route match results should be set correctly on successful match'); }