composer update
This commit is contained in:
parent
f6abc3dce2
commit
71dfaca858
1753 changed files with 45274 additions and 14619 deletions
|
@ -198,7 +198,7 @@ class MenuLinkContent extends MenuLinkBase implements ContainerFactoryPluginInte
|
|||
* The menu link ID.
|
||||
*/
|
||||
protected function getUuid() {
|
||||
$this->getDerivativeId();
|
||||
return $this->getDerivativeId();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
|
||||
namespace Drupal\Tests\menu_link_content\Unit;
|
||||
|
||||
use Drupal\menu_link_content\Plugin\Menu\MenuLinkContent;
|
||||
use Drupal\Tests\UnitTestCase;
|
||||
|
||||
/**
|
||||
* @coversDefaultClass \Drupal\menu_link_content\Plugin\Menu\MenuLinkContent
|
||||
*
|
||||
* @group Menu
|
||||
*/
|
||||
class MenuLinkPluginTest extends UnitTestCase {
|
||||
|
||||
/**
|
||||
* @covers ::getUuid
|
||||
*/
|
||||
public function testGetInstanceReflection() {
|
||||
/** @var \Drupal\menu_link_content\Plugin\Menu\MenuLinkContent $menu_link_content_plugin */
|
||||
$menu_link_content_plugin = $this->prophesize(MenuLinkContent::class);
|
||||
$menu_link_content_plugin->getDerivativeId()->willReturn('test_id');
|
||||
$menu_link_content_plugin = $menu_link_content_plugin->reveal();
|
||||
|
||||
$class = new \ReflectionClass(MenuLinkContent::class);
|
||||
$instance_method = $class->getMethod('getUuid');
|
||||
$instance_method->setAccessible(TRUE);
|
||||
|
||||
$this->assertEquals('test_id', $instance_method->invoke($menu_link_content_plugin));
|
||||
}
|
||||
|
||||
}
|
Reference in a new issue