コード例 #1
0
 public function testGroupAdd()
 {
     $randomPrefix = ToolsAPI::randomGen(5);
     $login = new Login($this);
     $groups = $login->setUsername(PHPUNIT_TESTSUITE_EXTENSION_SELENIUM_LOGIN)->setPassword(PHPUNIT_TESTSUITE_EXTENSION_SELENIUM_PASS)->submit()->openGroups()->add()->setName($this->newGroup['NAME'] . $randomPrefix)->setOwner('Main')->save()->assertMessage('Group saved')->close();
     $this->assertTrue($groups->entityExists(array('name' => $this->newGroup['NAME'] . $randomPrefix)));
     return $randomPrefix;
 }
コード例 #2
0
 public function testRolesAdd()
 {
     $randomPrefix = ToolsAPI::randomGen(5);
     $login = new Login($this);
     $roles = $login->setUsername(PHPUNIT_TESTSUITE_EXTENSION_SELENIUM_LOGIN)->setPassword(PHPUNIT_TESTSUITE_EXTENSION_SELENIUM_PASS)->submit()->openRoles()->add()->setLabel($this->newRole['LABEL'] . $randomPrefix)->setOwner('Main')->save()->assertMessage('Role saved')->close();
     //verify new Role
     $roles->refresh();
     $this->assertTrue($roles->entityExists(array('name' => $this->newRole['LABEL'] . $randomPrefix)));
     return $randomPrefix;
 }