Example #1
0
 /**
  * @test
  */
 public function defaultValuesAreSetForUriPatternSegmentsWithMultipleOptionalRouteParts()
 {
     $this->route->setUriPattern('{key1}-({key2})/({key3}).({key4}.{@format})');
     $defaults = array('key1' => 'defaultValue1', 'key2' => 'defaultValue2', 'key3' => 'defaultValue3', 'key4' => 'defaultValue4');
     $this->route->setDefaults($defaults);
     $this->route->matches('foo-/.bar.xml');
     $this->assertEquals(array('key1' => 'foo', 'key2' => 'defaultValue2', 'key3' => 'defaultValue3', 'key4' => 'bar', '@format' => 'xml'), $this->route->getMatchResults(), 'Route match results should be set correctly on successful match');
 }