1 |
599a39cd
|
Assos Assos
|
<?php
|
2 |
|
|
|
3 |
|
|
/**
|
4 |
|
|
* @file
|
5 |
|
|
* Data validation tests for the Date Popup module.
|
6 |
|
|
*/
|
7 |
|
|
|
8 |
|
|
/**
|
9 |
|
|
* Data validation tests for the Date Popup module.
|
10 |
|
|
*/
|
11 |
|
|
class DatePopupValidationTestCase extends DateValidationTestCase {
|
12 |
|
|
|
13 |
|
|
/**
|
14 |
|
|
* @todo.
|
15 |
|
|
*/
|
16 |
|
|
// public static function getInfo() {
|
17 |
|
|
// return array(
|
18 |
|
|
// 'name' => 'Date Popup Validation',
|
19 |
|
|
// 'description' => 'Data validation tests for the Date Popup module.',
|
20 |
|
|
// 'group' => 'Date',
|
21 |
|
|
// );
|
22 |
|
|
// }
|
23 |
|
|
|
24 |
|
|
/**
|
25 |
|
|
* {@inheritdoc}
|
26 |
|
|
*/
|
27 |
|
|
public function setUp(array $modules = array()) {
|
28 |
|
|
$modules[] = 'date_popup';
|
29 |
|
|
parent::setUp($modules);
|
30 |
|
|
}
|
31 |
|
|
|
32 |
|
|
/**
|
33 |
|
|
* Validate the Date Popup fields.
|
34 |
|
|
*/
|
35 |
|
|
public function testValidation() {
|
36 |
|
|
// Attempts to create text date field stored as a date with default settings
|
37 |
|
|
// (from input which is not valid).
|
38 |
|
|
foreach (array('date', 'datestamp', 'datetime') as $field_type) {
|
39 |
|
|
$this->checkDateField($field_type, 'date_popup', TRUE);
|
40 |
|
|
return;
|
41 |
|
|
}
|
42 |
|
|
}
|
43 |
|
|
|
44 |
|
|
} |