diff --git a/tests/phpunit/tests/admin/includes/image/wpExifDate2ts.php b/tests/phpunit/tests/admin/includes/image/wpExifDate2ts.php new file mode 100644 index 0000000000000..1abc32f0de73f --- /dev/null +++ b/tests/phpunit/tests/admin/includes/image/wpExifDate2ts.php @@ -0,0 +1,45 @@ +assertSame( + strtotime( '2000-01-02 03:04:05' ), + wp_exif_date2ts( $input ) + ); + } + + /** + * Data provider for test_converts_exif_datetime_to_timestamp(). + * + * @return array + */ + public static function data_exif_datetimes() { + return array( + 'valid Exif datetime' => array( '2000:01:02 03:04:05' ), + 'surrounding whitespace' => array( " \t2000:01:02 03:04:05\r\n " ), + ); + } +}