Example #1
0
 /**
  * Test method loadByKey()
  */
 public function testLoadByKey()
 {
     $this->_userResource->expects($this->once())->method('load')->with($this->anything(), 'key', 'api_key')->will($this->returnSelf());
     $model = $this->_createModel($this->_userResource);
     $result = $model->loadByKey('key');
     $this->assertInstanceOf('Mage_Webapi_Model_Acl_User', $result);
 }
Example #2
0
 /**
  * Init values with users assigned to role.
  *
  * @param array|null $values
  * @return array|null
  */
 public function update($values)
 {
     if ($this->_roleId) {
         $values = $this->_userResource->getRoleUsers($this->_roleId);
     }
     return $values;
 }