diff --git a/modules/authcache_comment/authcache_comment.test b/modules/authcache_comment/authcache_comment.test index 41723d7..705e501 100644 --- a/modules/authcache_comment/authcache_comment.test +++ b/modules/authcache_comment/authcache_comment.test @@ -161,6 +161,30 @@ class AuthcacheCommentTest extends DrupalWebTestCase { } /** + * Ensure that user setting is embedded for authenticated users. + */ + public function testUserSettingInCommentForm() { + $this->stubmod->hook('authcache_p13n_client', array( + 'authcache_p13n_test' => array( + 'title' => t('Test Client'), + 'enabled' => TRUE, + ), + )); + + $setting_markup = $this->randomName(8); + $setting_stub = HookStub::on('theme_authcache_p13n_setting__authcache_p13n_test', $setting_markup); + + // Then ensure that the setting is added when the site wide contact form is + // accessed with authenticated user. + $this->drupalLogin($this->member1); + $this->drupalGet('comment/reply/' . $this->node->nid); + $this->assertNoText($this->member1->name, 'Should remove the users name from the comment form'); + + $this->assertText($setting_markup); + $this->assertStub($setting_stub, HookStub::once()); + } + + /** * Test that the number of new comments is replaced by a partial. * * Covers authcache_comment_node_view_alter() diff --git a/modules/authcache_user/authcache_user.test b/modules/authcache_user/authcache_user.test index 21dbe57..4431316 100644 --- a/modules/authcache_user/authcache_user.test +++ b/modules/authcache_user/authcache_user.test @@ -30,19 +30,14 @@ class AuthcacheUserTest extends DrupalWebTestCase { parent::setUp(array( 'authcache_p13n_test', 'authcache_user', - 'comment', 'contact', )); $this->member1 = $this->drupalCreateUser(array( - 'access comments', - 'post comments', 'access user contact forms', 'access site-wide contact form', )); $this->member2 = $this->drupalCreateUser(array( - 'access comments', - 'post comments', 'access user contact forms', 'access site-wide contact form', )); @@ -141,30 +136,6 @@ class AuthcacheUserTest extends DrupalWebTestCase { } /** - * Ensure that user setting is embedded for authenticated users. - */ - public function testCommentForm() { - $this->stubmod->hook('authcache_p13n_client', array( - 'authcache_p13n_test' => array( - 'title' => t('Test Client'), - 'enabled' => TRUE, - ), - )); - - $setting_markup = $this->randomName(8); - $setting_stub = HookStub::on('theme_authcache_p13n_setting__authcache_p13n_test', $setting_markup); - - // Then ensure that the setting is added when the site wide contact form is - // accessed with authenticated user. - $this->drupalLogin($this->member1); - $this->drupalGet('comment/reply/' . $this->node->nid); - $this->assertNoText($this->member1->name, 'Should remove the users name from the comment form'); - - $this->assertText($setting_markup); - $this->assertStub($setting_stub, HookStub::once()); - } - - /** * User settings callback should return uid, name and mail of logged-in user. */ public function testUserSettingsCallback() {