diff --git a/sites/all/modules/contrib/invite/tests/InviteExpireTest.test b/sites/all/modules/contrib/invite/tests/InviteExpireTest.test index 2bc3895..a263943 100644 --- a/sites/all/modules/contrib/invite/tests/InviteExpireTest.test +++ b/sites/all/modules/contrib/invite/tests/InviteExpireTest.test @@ -5,6 +5,9 @@ * Contains \InviteExpireTest. */ +/** + * Tests the expire functionality of the invite module. + */ class InviteExpireTest extends DrupalWebTestCase { /** @@ -16,7 +19,6 @@ class InviteExpireTest extends DrupalWebTestCase { module_enable(array('invite')); } - /** * {@inheritdoc} */ @@ -29,13 +31,12 @@ class InviteExpireTest extends DrupalWebTestCase { } /** - * {@inheritdoc} + * Tests the expire functionality of the invite module. */ public function testExpire() { - // Setup an expire time of 3 weeks. // The idea of this test is to fake the expire time to - 3weeks to ensure - // that the checking works. + // that the expire logic works. variable_set('invite_default_expiry_time', 21); $invite_type = entity_create('invite_type', array('label' => 'Test invite type', 'type' => 'test_type')); @@ -50,8 +51,9 @@ class InviteExpireTest extends DrupalWebTestCase { $invite->setUser($inviter); $invite->invitee = $invitee->uid; - // Manipulate to set the expiry date to -3 weeks, and wait a second. - // If the expire checking works correctly, + // Manipulate the expiry date to -3 weeks, and wait a second. + // If the expire checking works correctly, we expect the invitation to be + // expired. $invite->expiry -= 3 * 7 * 24 * 3600; entity_save('invite', $invite); sleep(1); @@ -61,7 +63,8 @@ class InviteExpireTest extends DrupalWebTestCase { $this->assertText('This invitation has expired.'); $this->assertUrl(''); - // Change back the expiry date to the future. + // Change back the expiry date to the future. Now we expect it to be valid + // again. $invite->expiry += 3 * 7 * 24 * 3600; entity_save('invite', $invite);