1 common.test public CommonFormatDateTestCase::testFormatDiff()

Tests the formatDiff method.

@covers ::formatDiff

File

core/modules/simpletest/tests/common.test, line 3059
Tests for common.inc functionality.

Class

CommonFormatDateTestCase
Tests the format_date() function.

Code

public function testFormatDiff() {
  $test_data = $this->providerTestFormatDiff();
  foreach ($test_data as $data) {
    list($expected, $timestamp1, $timestamp2, $options) = $data;

    $this->assertEqual($expected, format_time_diff($timestamp1, $timestamp2, $options));
  }
}