/** * 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); }