MINOR Making SecurityAdminTest more resilient against markup order changes

This commit is contained in:
Ingo Schommer 2011-12-22 15:57:01 +01:00
parent 1eaf45a118
commit 0dab75c3a0
1 changed files with 7 additions and 3 deletions

View File

@ -13,8 +13,10 @@ class SecurityAdminTest extends FunctionalTest {
$this->session()->inst_set('loggedInAs', $this->idFromFixture('Member', 'admin'));
/* First, open the applicable group */
$this->get('admin/security/show/' . $this->idFromFixture('Group','admin'));
$this->assertRegExp('/<input[^>]+id="Form_EditForm_Title"[^>]+value="Administrators"[^>]*>/',$this->content());
$response = $this->get('admin/security/show/' . $this->idFromFixture('Group','admin'));
$inputs = $this->cssParser()->getBySelector('input#Form_EditForm_Title');
$this->assertNotNull($inputs);
$this->assertEquals('Administrators', (string)$inputs[0]['value']);
/* Then load the export page */
$this->get('admin/security/EditForm/field/Members/export');
@ -29,7 +31,9 @@ class SecurityAdminTest extends FunctionalTest {
/* First, open the applicable group */
$this->get('admin/security/show/' . $this->idFromFixture('Group','empty'));
$this->assertRegExp('/<input[^>]+id="Form_EditForm_Title"[^>]+value="Empty Group"[^>]*>/',$this->content());
$inputs = $this->cssParser()->getBySelector('input#Form_EditForm_Title');
$this->assertNotNull($inputs);
$this->assertEquals('Empty Group', (string)$inputs[0]['value']);
/* Then load the export page */
$this->get('admin/security/EditForm/field/Members/export');