Skip to content

Commit

Permalink
MINOR Making SecurityAdminTest more resilient against markup order ch…
Browse files Browse the repository at this point in the history
…anges
  • Loading branch information
chillu committed Jan 2, 2012
1 parent 1eaf45a commit 0dab75c
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions admin/tests/SecurityAdminTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ function testGroupExport() {
$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');
Expand All @@ -29,7 +31,9 @@ function testEmptyGroupExport() {

/* 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');
Expand Down

0 comments on commit 0dab75c

Please sign in to comment.