X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=web%2Fcore%2Ftests%2FDrupal%2FTests%2FCore%2FMenu%2FContextualLinkManagerTest.php;fp=web%2Fcore%2Ftests%2FDrupal%2FTests%2FCore%2FMenu%2FContextualLinkManagerTest.php;h=ddc0fbd4154e653145bac1a693edc2eb7d3b2574;hb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;hp=bebc935bb5723b1bbc81ff394c2441028e573ff5;hpb=aea91e65e895364e460983b890e295aa5d5540a5;p=yaffs-website diff --git a/web/core/tests/Drupal/Tests/Core/Menu/ContextualLinkManagerTest.php b/web/core/tests/Drupal/Tests/Core/Menu/ContextualLinkManagerTest.php index bebc935bb..ddc0fbd41 100644 --- a/web/core/tests/Drupal/Tests/Core/Menu/ContextualLinkManagerTest.php +++ b/web/core/tests/Drupal/Tests/Core/Menu/ContextualLinkManagerTest.php @@ -278,20 +278,7 @@ class ContextualLinkManagerTest extends UnitTestCase { // Set up mocking of the plugin factory. $map = []; foreach ($definitions as $plugin_id => $definition) { - $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)]; } $this->factory->expects($this->any()) ->method('createInstance') @@ -308,6 +295,7 @@ class ContextualLinkManagerTest extends UnitTestCase { $this->assertEquals($definition['weight'], $result[$plugin_id]['weight']); $this->assertEquals($definition['title'], $result[$plugin_id]['title']); $this->assertEquals($definition['route_name'], $result[$plugin_id]['route_name']); + $this->assertEquals($definition['options'], $result[$plugin_id]['localized_options']); } }