eZ\Publish\Core\MVC\Symfony\Security\Tests\UserTest::testToString PHP Method

testToString() public method

public testToString ( )
    public function testToString()
    {
        $fullName = 'My full name';
        $userContentInfo = $this->getMockBuilder('eZ\\Publish\\API\\Repository\\Values\\Content\\ContentInfo')->setConstructorArgs(array(array('name' => $fullName)))->getMockForAbstractClass();
        $apiUser = $this->getMock('eZ\\Publish\\API\\Repository\\Values\\User\\User');
        $apiUser->expects($this->any())->method('__get')->with('contentInfo')->will($this->returnValue($userContentInfo));
        $user = new User($apiUser);
        $this->assertSame($fullName, (string) $user);
    }