function testUpdateSsoUserId()
 {
     $dllUserPartialMock = new PartialMockOA_Dll_User($this);
     $dllUserPartialMock->setReturnValue('checkPermissions', true);
     $dllUserPartialMock->expectCallCount('checkPermissions', 4);
     $doUsers = OA_Dal::factoryDO('users');
     $doUsers->username = '******' . time();
     $doUsers->sso_user_id = 0;
     $this->assertTrue($userId = DataGenerator::generateOne($doUsers));
     $this->assertFalse($dllUserPartialMock->updateSsoUserId(1001, 1002));
     $doUsers = OA_Dal::factoryDO('users');
     $doUsers->user_id = $userId;
     $doUsers->sso_user_id = 1001;
     $doUsers->update();
     $this->assertTrue($dllUserPartialMock->updateSsoUserId(1001, 1002), $dllUserPartialMock->getLastError());
     // Test errors
     $this->assertTrue(!$dllUserPartialMock->updateSsoUserId(0, 1) && $dllUserPartialMock->getLastError() == OA_Dll_User::ERROR_WRONG_PARAMS, $this->_getMethodShouldReturnError(OA_Dll_User::ERROR_WRONG_PARAMS));
     $this->assertTrue(!$dllUserPartialMock->updateSsoUserId(1, 0) && $dllUserPartialMock->getLastError() == OA_Dll_User::ERROR_WRONG_PARAMS, $this->_getMethodShouldReturnError(OA_Dll_User::ERROR_WRONG_PARAMS));
     $dllUserPartialMock->tally();
 }