addContentNavigationProvider() public method

Adds a content navigation provider to the given alias.
public addContentNavigationProvider ( string $alias, string $id )
$alias string The alias to which the given items should be added
$id string The id of the content navigation provider
コード例 #1
0
 /**
  * @dataProvider provideContentNavigationItems
  */
 public function testGetNavigationItems($mappings, $options, $contentNavigationData, $results)
 {
     foreach ($mappings as $alias => $services) {
         foreach ($services as $service) {
             $this->contentNavigationCollector->addContentNavigationProvider($alias, $service);
         }
     }
     foreach ($contentNavigationData as $service => $items) {
         $contentNavigationProvider = $this->prophesize(ContentNavigationProviderInterface::class);
         $contentNavigationProvider->getNavigationItems($options)->willReturn($items);
         $this->container->get($service)->willReturn($contentNavigationProvider);
     }
     foreach ($results as $alias => $result) {
         $this->assertEquals($result, $this->contentNavigationCollector->getNavigationItems($alias, $options));
     }
 }