public function testIsObjectSharedWithUser() { $this->shareProvider->expects($this->once())->method('isObjectSharedWithUser')->willReturn(true); $token = $this->getMockBuilder('Symfony\\Component\\Security\\Core\\Authentication\\Token\\TokenInterface')->disableOriginalConstructor()->getMock(); $this->securityContext->expects($this->once())->method('getToken')->willReturn($token); $this->assertTrue($this->facade->isObjectSharedWithUser(new \stdClass())); }