createMock(AccessDecisionManagerInterface::class); $manager->expects($this->once())->method('decide')->willReturn(true); $token = $this->createMock(TokenInterface::class); $sut = new AclDecisionManager($manager); $result = $sut->isFullyAuthenticated($token); self::assertTrue($result); } public function testIsNotFullyAuthenticated() { $manager = $this->createMock(AccessDecisionManagerInterface::class); $manager->expects($this->once())->method('decide')->willReturn(false); $token = $this->createMock(TokenInterface::class); $sut = new AclDecisionManager($manager); $result = $sut->isFullyAuthenticated($token); self::assertFalse($result); } }