You are here

class FeedsDateTimeTest in Feeds 8.2

Test FeedsDateTime class.

Using DrupalWebTestCase as DrupalUnitTestCase is broken in SimpleTest 2.8. Not inheriting from Feeds base class as ParserCSV should be moved out of Feeds at some time.

Hierarchy

Expanded class hierarchy of FeedsDateTimeTest

File

lib/Drupal/feeds/Tests/FeedsDateTimeTest.php, line 20
Tests for FeedsDateTime class.

Namespace

Drupal\feeds\Tests
View source
class FeedsDateTimeTest extends UnitTestBase {
  public static function getInfo() {
    return array(
      'name' => 'FeedsDateTime unit tests',
      'description' => 'Unit tests for Feeds date handling.',
      'group' => 'Feeds',
    );
  }

  /**
   * 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')));
  }

}

Members

Namesort descending Modifiers Type Description Overrides
FeedsDateTimeTest::getInfo public static function
FeedsDateTimeTest::test public function Dispatch tests, only use one entry point method testX to save time.