/[drupal]/contributions/modules/undisposable/undisposable.test
ViewVC logotype

Diff of /contributions/modules/undisposable/undisposable.test

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1, Tue May 27 21:36:03 2008 UTC revision 1.2, Tue May 27 21:39:15 2008 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: undisposable.test,v 1.1 2008/04/12 13:02:52 mustafau Exp $  // $Id: undisposable.test,v 1.1 2008/05/27 21:36:03 mustafau Exp $
3    
4  /**  /**
5   * @file   * @file
6   */   */
7    
8  /**  /**
9   * Undisposable_TestCase class.   * UndisposableTestCase class.
10   */   */
11  class Undisposable_TestCase extends DrupalTestCase {  class UndisposableTestCase extends DrupalWebTestCase {
12    function get_info() {    /**
13       * Implementation of getInfo().
14       */
15      function getInfo() {
16      return array(      return array(
17        'name' => 'Undisposable test case',        'name' => t('Disposable e-mail protection test case'),
18        'desc' => 'Tests whether Undisposable is working or not.',        'description' => t('Tests whether Disposable e-mail protection is working or not.'),
19        'group' => 'Undisposable',        'group' => t('Disposable e-mail protection'),
20      );      );
21    }    }
22    
23      function testUndisposable() {
24        // Valid e-mail address.
25        $respond = _undisposable('isDisposableEmail', 'drupal@drupal.org');
26        $this->assertFalse($respond['email']['isdisposable'], 'drupal@drupal.org is not a disposable e-mail address.');
27    
28        // Disposable e-mail address.
29        $respond = _undisposable('isDisposableEmail', 'drupal@10minutemail.com');
30        $this->assertNotEqual($respond['stat'], 'ok', 'drupal@10minutemail.com is a disposable e-mail address.');
31      }
32  }  }

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.2