Unverified Commit 7a15b86f 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

(cherry picked from commit ca32fdf4)
parent ca55de89
Loading
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -46,7 +46,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);