Exemplo n.º 1
0
 /**
  * @magentoDataFixture roleDataFixture
  */
 public function testGetRoles()
 {
     $this->_model->loadByUsername(\Magento\TestFramework\Bootstrap::ADMIN_NAME);
     $roles = $this->_model->getRoles();
     $this->assertEquals(1, count($roles));
     $this->assertEquals(1, $roles[0]);
     $this->_model->setRoleId(self::$_newRole->getId())->save();
     $roles = $this->_model->getRoles();
     $this->assertEquals(1, count($roles));
     $this->assertEquals(self::$_newRole->getId(), $roles[0]);
 }
 /**
  * @return void
  */
 public function testGetRoles()
 {
     $this->resourceMock->expects($this->once())->method('getRoles')->with($this->model)->willReturn([]);
     $this->assertInternalType('array', $this->model->getRoles());
 }