diff --git a/core/modules/system/lib/Drupal/system/Tests/Common/IntervalTest.php b/core/modules/system/lib/Drupal/system/Tests/Common/IntervalTest.php
new file mode 100644
index 0000000..9eda73e
--- /dev/null
+++ b/core/modules/system/lib/Drupal/system/Tests/Common/IntervalTest.php
@@ -0,0 +1,83 @@
+<?php
+/**
+ * @file
+ * Definition of Drupal\system\Tests\Common\IntervalTest.
+ */
+
+namespace Drupal\system\Tests\Common;
+
+use Drupal\simpletest\WebTestBase;
+
+/**
+ * Tests format_interval().
+ */
+class IntervalTest extends WebTestBase {
+  /**
+   * Modules to enable.
+   *
+   * @var array
+   */
+  public static $modules = array();
+
+  public static function getInfo() {
+    return array(
+      'name' => 'Interval functionality',
+      'description' => 'Tests the format_interval() functionality.',
+      'group' => 'Common',
+    );
+  }
+
+  /**
+   * Tests format_interval().
+   *
+   * These are trival tests based on static inputs.
+   */
+  function testFormatIntervalBasic() {
+    // A list of lengths of time in seconds which map to their words.
+    $intervals = array(
+      5 => '5 sec',
+      60 * 1 => '1 min',
+      60 * 10 => '10 min',
+      60 * 60 => '1 hour',
+      60 * 60 * 24 => '1 day',
+      60 * 60 * 24 * 7 => '1 week',
+    );
+    foreach ($intervals as $interval => $expected) {
+      $actual = format_interval($interval);
+      $this->assertEqual($expected, $actual, sprintf('%d seconds is %s (%s)', $interval, $actual, $expected));
+    }
+  }
+
+  /**
+   * Tests for format_interval().
+   *
+   * These are more complex tests based on the current timestamp.
+   */
+  function testFormatIntervalComplex() {
+    // Here we take some expected results and see if they match up.
+    // This text is formated the same as format_interval's results.
+    $results = array(
+      '2 weeks',
+      '4 weeks',
+      '1 month',
+      '3 years',
+      '1 month 2 days',
+      '1 week 4 hours',
+      '2 years 4 days',
+      '1 month 2 days',
+      '4 months 2 weeks 5 min',
+      '4 months 1 min',
+      // Below are the more complex tests that require proper date functions.
+      '3 months 6 days',
+      '3 months 2 weeks 5 days',
+      '2 months 1 day',
+      '11 months 4 weeks 1 day',
+    );
+    foreach ($results as $expected) {
+      // Find out how many seconds make up '2 weeks'.
+      $interval = strtotime('now + ' . $expected) - time();
+      $actual = format_interval($interval, 3);
+      $this->assertEqual($expected, $actual, sprintf('%d seconds is %s (%s)', $interval, $actual, $expected));
+    }
+  }
+}
