t('FeedsDateTime unit tests'), 'description' => t('Unit tests for Feeds date handling.'), 'group' => t('Feeds'), ); } /** * Set up. */ public function setUp() { parent::setUp('feeds', 'feeds_ui', 'ctools', 'job_scheduler'); // Trick feeds into loading the FeedsParser class file. // @todo: break out FeedsElement and children into its own include file. feeds_plugin_instance('FeedsCSVParser', 'test'); } /** * Dispatch tests, only use one entry point method testX to save time. */ public function test() { $date = new FeedsDateTime('2010-20-12'); $this->assertTrue(is_numeric($date->format('U'))); $date = new FeedsDateTime('created'); $this->assertTrue(is_numeric($date->format('U'))); $date = new FeedsDateTime('12/3/2009 20:00:10'); $this->assertTrue(is_numeric($date->format('U'))); } }