From bbe4b34681f9bb52c344ac4475c1adc7b5c3f601 Mon Sep 17 00:00:00 2001 From: David Rothstein Date: Mon, 4 Jun 2012 01:07:43 -0400 Subject: Issue #1600892 by tim.plunkett, sun: Fixed Tests use magic numbers 1 and 2 instead of user role constants. --- modules/book/book.test | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'modules/book') diff --git a/modules/book/book.test b/modules/book/book.test index 6c351b8ec..1ec1fe92f 100644 --- a/modules/book/book.test +++ b/modules/book/book.test @@ -279,8 +279,8 @@ class BookTestCase extends DrupalWebTestCase { // Give anonymous users the permission 'node test view'. $edit = array(); - $edit['1[node test view]'] = TRUE; - $this->drupalPost('admin/people/permissions/1', $edit, t('Save permissions')); + $edit[DRUPAL_ANONYMOUS_RID . '[node test view]'] = TRUE; + $this->drupalPost('admin/people/permissions/' . DRUPAL_ANONYMOUS_RID, $edit, t('Save permissions')); $this->assertText(t('The changes have been saved.'), t("Permission 'node test view' successfully assigned to anonymous users.")); // Test correct display of the block. @@ -315,8 +315,8 @@ class BookTestCase extends DrupalWebTestCase { // Give anonymous users the permission 'node test view'. $edit = array(); - $edit['1[node test view]'] = TRUE; - $this->drupalPost('admin/people/permissions/1', $edit, t('Save permissions')); + $edit[DRUPAL_ANONYMOUS_RID . '[node test view]'] = TRUE; + $this->drupalPost('admin/people/permissions/' . DRUPAL_ANONYMOUS_RID, $edit, t('Save permissions')); $this->assertText(t('The changes have been saved.'), t('Permission \'node test view\' successfully assigned to anonymous users.')); // Create a book. -- cgit v1.2.3