stableversion-3.0
Last change
on this file since 92213c1 was
177a560,
checked in by José Gregorio Puentes <jpuentes@…>, 8 años ago
|
se agrego el directorio de modulos contribuidos de drupal
|
-
Propiedad mode establecida a
100755
|
File size:
1.2 KB
|
Línea | |
---|
1 | <?php |
---|
2 | |
---|
3 | /** |
---|
4 | * @file |
---|
5 | * Tests for FeedsDateTime class. |
---|
6 | */ |
---|
7 | |
---|
8 | /** |
---|
9 | * Test FeedsDateTime class. |
---|
10 | * |
---|
11 | * Using DrupalWebTestCase as DrupalUnitTestCase is broken in SimpleTest 2.8. |
---|
12 | * Not inheriting from Feeds base class as ParserCSV should be moved out of |
---|
13 | * Feeds at some time. |
---|
14 | */ |
---|
15 | class FeedsDateTimeTest extends FeedsWebTestCase { |
---|
16 | public static function getInfo() { |
---|
17 | return array( |
---|
18 | 'name' => 'FeedsDateTime unit tests', |
---|
19 | 'description' => 'Unit tests for Feeds date handling.', |
---|
20 | 'group' => 'Feeds', |
---|
21 | ); |
---|
22 | } |
---|
23 | |
---|
24 | public function setUp() { |
---|
25 | parent::setUp(); |
---|
26 | |
---|
27 | // Trick feeds into loading the FeedsParser class file. |
---|
28 | // @todo: break out FeedsElement and children into its own include file. |
---|
29 | feeds_plugin_instance('FeedsCSVParser', 'test'); |
---|
30 | } |
---|
31 | |
---|
32 | /** |
---|
33 | * Dispatch tests, only use one entry point method testX to save time. |
---|
34 | */ |
---|
35 | public function test() { |
---|
36 | $date = new FeedsDateTime('2010-20-12'); |
---|
37 | $this->assertTrue(is_numeric($date->format('U'))); |
---|
38 | $date = new FeedsDateTime('created'); |
---|
39 | $this->assertTrue(is_numeric($date->format('U'))); |
---|
40 | $date = new FeedsDateTime('12/3/2009 20:00:10'); |
---|
41 | $this->assertTrue(is_numeric($date->format('U'))); |
---|
42 | } |
---|
43 | } |
---|
Nota: Vea
TracBrowser
para ayuda de uso del navegador del repositorio.