eZ\Publish\Core\MVC\Symfony\Security\Tests\User\IdentityTest::testAddInformation PHP Method

testAddInformation() public method

public testAddInformation ( )
    public function testAddInformation()
    {
        $identity = new Identity();
        $this->assertSame(array(), $identity->getInformation());
        $additionalInfo = array('foo' => 'bar', 'truc' => 'muche', 'number' => 123);
        $identity->addInformation($additionalInfo);
        $this->assertSame($additionalInfo, $identity->getInformation());
        $moreInfo = array('another' => 'one', 'foot' => 'print');
        $identity->addInformation($moreInfo);
        $this->assertEquals($additionalInfo + $moreInfo, $identity->getInformation());
    }