diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Solr/UtilsTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Solr/UtilsTest.php
index 3fb051eebc79fb0cdba8ce3ab9d2df0d4a102c86..364477564e7117166a3ec32510c307975c8ad3e6 100644
--- a/module/VuFind/tests/unit-tests/src/VuFindTest/Solr/UtilsTest.php
+++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Solr/UtilsTest.php
@@ -60,4 +60,32 @@ class UtilsTest extends \VuFindTest\Unit\TestCase
         $this->assertFalse(Utils::parseRange('1 TO 100'));
         $this->assertFalse(Utils::parseRange('[not a range to me]'));
     }
+
+    /**
+     * Test sanitizeDate functionality.
+     *
+     * @return void
+     */
+    public function testSanitizeDate()
+    {
+        $tests = array(
+            '[2014]' => '2014-01-01',
+            'n.d.' => null,
+            'may 7, 1981' => '1981-05-07',
+            'July 1570' => '1570-07-01',
+            'incomprehensible garbage' => null,
+            '1930/12/21' => '1930-12-21',
+            '1964?' => '1964-01-01',
+            '1947-3' => '1947-03-01',
+            '1973-02-31' => '1973-02-01',       // illegal day
+            '1973-31-31' => '1973-01-01',       // illegal month
+        );
+        
+        foreach ($tests as $in => $out) {
+            $this->assertEquals(
+                $out === null ? null : $out . 'T00:00:00Z', // append standard time value unless null
+                Utils::sanitizeDate($in)
+            );
+        }
+    }
 }
\ No newline at end of file