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

Contents of /contributions/modules/undisposable/undisposable.test

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


Revision 1.2 - (show annotations) (download) (as text)
Tue May 27 21:39:15 2008 UTC (17 months, 4 weeks ago) by mustafau
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +20 -7 lines
File MIME type: text/x-php
Tests.
1 <?php
2 // $Id: undisposable.test,v 1.1 2008/05/27 21:36:03 mustafau Exp $
3
4 /**
5 * @file
6 */
7
8 /**
9 * UndisposableTestCase class.
10 */
11 class UndisposableTestCase extends DrupalWebTestCase {
12 /**
13 * Implementation of getInfo().
14 */
15 function getInfo() {
16 return array(
17 'name' => t('Disposable e-mail protection test case'),
18 'description' => t('Tests whether Disposable e-mail protection is working or not.'),
19 '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 }

  ViewVC Help
Powered by ViewVC 1.1.2