eZ\Publish\Core\Repository\Tests\Service\Integration\UserBase::testReadOnlyProperty PHP Method

testReadOnlyProperty() public method

Test setting read only property.
    public function testReadOnlyProperty()
    {
        try {
            $user = new User();
            $user->login = 'user';
            self::fail('Succeeded setting read only property');
        } catch (PropertyReadOnlyException $e) {
        }
        try {
            $userGroup = new UserGroup();
            $userGroup->parentId = 42;
            self::fail('Succeeded setting read only property');
        } catch (PropertyReadOnlyException $e) {
        }
    }