- $plugin = $this->getMock('Drupal\Core\Menu\ContextualLinkInterface');
- $plugin->expects($this->any())
- ->method('getRouteName')
- ->will($this->returnValue($definition['route_name']));
- $plugin->expects($this->any())
- ->method('getTitle')
- ->will($this->returnValue($definition['title']));
- $plugin->expects($this->any())
- ->method('getWeight')
- ->will($this->returnValue($definition['weight']));
- $plugin->expects($this->any())
- ->method('getOptions')
- ->will($this->returnValue($definition['options']));
- $map[] = [$plugin_id, [], $plugin];
+ $map[] = [$plugin_id, [], new ContextualLinkDefault([], $plugin_id, $definition)];