diff --git a/core/tests/Drupal/Tests/Core/Datetime/DateTest.php b/core/tests/Drupal/Tests/Core/Datetime/DateTest.php
index da9ebaa..303d09d 100644
--- a/core/tests/Drupal/Tests/Core/Datetime/DateTest.php
+++ b/core/tests/Drupal/Tests/Core/Datetime/DateTest.php
@@ -5,9 +5,10 @@
  * Contains \Drupal\Tests\Core\Datetime\DateTest.
  */
 
-namespace Drupal\Tests\Core\Datetime;
+namespace Drupal\Tests\Core\Datetime {
 
 use Drupal\Core\Datetime\DateFormatter;
+use Drupal\Core\DependencyInjection\ContainerBuilder;
 use Drupal\Tests\UnitTestCase;
 
 /**
@@ -45,7 +46,13 @@ class DateTest extends UnitTestCase {
   protected $dateFormatter;
 
   protected function setUp() {
+    parent::setUp();
+
+    $entity_storage = $this->getMock('Drupal\Core\Entity\EntityStorageInterface');
+
     $this->entityManager = $this->getMock('Drupal\Core\Entity\EntityManagerInterface');
+    $this->entityManager->expects($this->once())->method('getStorage')->with('date_format')->willReturn($entity_storage);
+
     $this->languageManager = $this->getMock('Drupal\Core\Language\LanguageManagerInterface');
     $this->stringTranslation = $this->getMock('Drupal\Core\StringTranslation\TranslationInterface');
 
@@ -128,4 +135,37 @@ public function testFormatIntervalZeroSecond() {
     $this->assertEquals('0 sec', $result);
   }
 
+  /**
+   * Tests the getSampleDateFormats method.
+   *
+   * @see \Drupal\Core\Datetime\DateFormatter::getSampleDateFormats()
+   */
+  public function testGetSampleDateFormats() {
+    include_once $this->root . '/core/includes/common.inc';
+    $ts = strtotime('2015-03-22 14:23:00');
+    $this->dateFormatter->setCountryCode('GB');
+    $expected = $this->dateFormatter->getSampleDateFormats('en', $ts, 'Europe/London');
+
+    // Removed characters related to timezone 'e' and 'T', as test does not have
+    // timezone set.
+    $date_characters = 'dDjlNSwzWFmMntLoYyaABgGhHisuIOPZcrU';
+    $date_chars = str_split($date_characters);
+
+    foreach ($date_chars as $val) {
+      $this->assertEquals($expected[$val], date($val, $ts));
+    }
+  }
+
+}
+
+}
+
+namespace {
+  use Drupal\Component\Utility\String;
+
+  if (!function_exists('t')) {
+    function t($string, array $args = []) {
+      return String::format($string, $args);
+    }
+  }
 }
