Ejemplo n.º 1
0
 /**
  * @param $id
  * @return \Magento\User\Model\User
  */
 public function getAdminUser($id)
 {
     return $this->adminUser->load($id);
 }
Ejemplo n.º 2
0
 /**
  * @expectedException \Magento\Framework\Exception\AuthenticationException
  * @magentoDbIsolation enabled
  */
 public function testAuthenticateUserWithoutRole()
 {
     $this->_model->load(1);
     $this->_model->setRoleId(1)->deleteFromRole();
     $this->_model->authenticate(\Magento\TestFramework\Bootstrap::ADMIN_NAME, \Magento\TestFramework\Bootstrap::ADMIN_PASSWORD);
 }
 /**
  * Retrieve the admin user's information.
  *
  * @return array
  */
 private function getExpectedExtensionAttributes()
 {
     $this->user->load(1);
     return ['firstname' => $this->user->getFirstname(), 'lastname' => $this->user->getLastname(), 'email' => $this->user->getEmail()];
 }