public function testContent()
 {
     $routePattern = new RoutePattern('uri');
     $adapter = new IRoutePatternSetterAdapter($routePattern);
     $adapter->content('contentType');
     $this->assertSame('contentType', $routePattern->getContentType());
 }
Пример #2
0
 public function testContent()
 {
     $routePattern1 = new RoutePattern('uri1');
     $routePattern2 = new RoutePattern('uri2');
     $group = new Group([new IRoutePatternSetterAdapter($routePattern1), new IRoutePatternSetterAdapter($routePattern2)]);
     $group->content('content');
     $this->assertSame('content', $routePattern1->getContentType());
     $this->assertSame('content', $routePattern2->getContentType());
 }