eZ\Publish\Core\MVC\Symfony\Security\Tests\UserWrappedTest::testGetSetAPIUser PHP Method

testGetSetAPIUser() public method

public testGetSetAPIUser ( )
    public function testGetSetAPIUser()
    {
        $originalUser = $this->getMock('Symfony\\Component\\Security\\Core\\User\\UserInterface');
        $userWrapped = new UserWrapped($originalUser, $this->apiUser);
        $this->assertSame($this->apiUser, $userWrapped->getAPIUser());
        $newApiUser = $this->getMock('eZ\\Publish\\API\\Repository\\Values\\User\\User');
        $userWrapped->setAPIUser($newApiUser);
        $this->assertSame($newApiUser, $userWrapped->getAPIUser());
    }