Unverified Commit ca32fdf4 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3555522 by tobiasb: Fix account mock in...

Issue #3555522 by tobiasb: Fix account mock in \Drupal\Tests\menu_link_content\Unit\MenuLinkContentEntityAccessTest::testUnrecognizedOperation for php 8.5
parent dd843828
Loading
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -47,7 +47,9 @@ public function testUnrecognizedOperation(): void {
      ->willReturn($language);

    $account = $this->createMock(AccountInterface::class);

    $account->expects($this->atLeastOnce())
      ->method('id')
      ->willReturn(42);
    $accessControl = new MenuLinkContentAccessControlHandler($entityType, $accessManager);
    $accessControl->setModuleHandler($moduleHandler);
    $access = $accessControl->access($entity, 'not-an-op', $account, TRUE);