public function testGroupAdd() { $randomPrefix = WebTestCase::generateRandomString(5); $login = $this->login(); /** @var Groups $login */ $groups = $login->openGroups('Oro\\Bundle\\UserBundle')->add()->setName($this->newGroup['NAME'] . $randomPrefix)->setOwner('Main')->save()->assertMessage('Group saved')->close(); static::assertTrue($groups->entityExists(array('name' => $this->newGroup['NAME'] . $randomPrefix))); return $randomPrefix; }
public function testRolesAddSaveAndClose() { $randomPrefix = WebTestCase::generateRandomString(5); $login = $this->login(); /** @var Roles $login */ $roles = $login->openRoles('Oro\\Bundle\\UserBundle')->assertTitle('All - Roles - User Management - System')->add()->assertTitle('Create Role - Roles - User Management - System')->setLabel($this->newRole['LABEL'] . $randomPrefix)->save()->assertMessage('Role saved')->close(); //verify new Role $roles->refresh(); static::assertTrue($roles->entityExists(array('name' => $this->newRole['LABEL'] . $randomPrefix))); return $randomPrefix; }