コード例 #1
0
ファイル: GroupsTest.php プロジェクト: Maksold/platform
 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;
 }
コード例 #2
0
ファイル: RolesTest.php プロジェクト: Maksold/platform
 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;
 }