WordPress.org

Make WordPress Core

Ticket #28636: 28636.tests.2.diff

File 28636.tests.2.diff, 723 bytes (added by soulseekah, 13 months ago)

(without weird tabs at the end)

  • tests/phpunit/tests/date/dateI18n.php

    diff --git tests/phpunit/tests/date/dateI18n.php tests/phpunit/tests/date/dateI18n.php
    index 5a13e3c437..1bd541bfeb 100644
    class Tests_Date_I18n extends WP_UnitTestCase { 
    1919                $this->assertEquals( $wp_timestamp, date_i18n( 'U', 'invalid' ), '', 5 );
    2020        }
    2121
     22        public function test_should_return_epoch_start_on_0() {
     23                $this->assertEquals( 0, date_i18n( 'U', 0 ) );
     24                $this->assertEquals( '1970-01-01', date_i18n( 'Y-m-d', 0 ) );
     25        }
     26
    2227        public function test_should_format_date() {
    2328                $this->assertEquals( strtotime( gmdate( 'Y-m-d H:i:s' ) ), strtotime( date_i18n( 'Y-m-d H:i:s' ) ), 'The dates should be equal', 2 );
    2429        }