Changeset 29351
- Timestamp:
- 08/01/2014 09:06:49 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/post.php
r29344 r29351 870 870 * @ticket 13771 871 871 */ 872 function test_get_the_date_with_id () {872 function test_get_the_date_with_id_returns_correct_time() { 873 873 $post_id = $this->factory->post->create( array( 'post_date' => '2014-03-01 16:35:00' ) ); 874 874 $this->assertEquals( 'March 1, 2014', get_the_date( 'F j, Y', $post_id ) ); … … 878 878 * @ticket 28310 879 879 */ 880 function test_get_the_date_returns_false_with_null_ post() {880 function test_get_the_date_returns_false_with_null_or_non_existing_post() { 881 881 $this->assertFalse( get_the_date() ); 882 }883 884 /**885 * @ticket 28310886 */887 function test_get_the_date_returns_false_with_format_and_null_post() {888 882 $this->assertFalse( get_the_date( 'F j, Y h:i:s' ) ); 889 }890 891 /**892 * @ticket 28310893 */894 function test_get_the_date_returns_false_with_post_that_is_not_found() {895 883 $this->assertFalse( get_the_date( '', 9 ) ); 896 }897 898 /**899 * @ticket 28310900 */901 function test_get_the_date_returns_false_with_format_and_post_that_is_not_found() {902 884 $this->assertFalse( get_the_date( 'F j, Y h:i:s', 9 ) ); 903 885 } … … 914 896 * @ticket 28310 915 897 */ 916 function test_get_the_time_returns_false_with_null_ post() {898 function test_get_the_time_returns_false_with_null_or_non_existing_post() { 917 899 $this->assertFalse( get_the_time() ); 918 }919 920 /**921 * @ticket 28310922 */923 function test_get_the_time_returns_false_with_format_and_null_post() {924 900 $this->assertFalse( get_the_time( 'h:i:s' ) ); 925 }926 927 /**928 * @ticket 28310929 */930 function test_get_the_time_returns_false_with_post_that_is_not_found() {931 901 $this->assertFalse( get_the_time( '', 9 ) ); 932 }933 934 /**935 * @ticket 28310936 */937 function test_get_the_time_returns_false_with_format_and_post_that_is_not_found() {938 902 $this->assertFalse( get_the_time( 'h:i:s', 9 ) ); 939 903 } … … 950 914 * @ticket 28310 951 915 */ 952 function test_get_post_time_returns_false_with_null_ post() {916 function test_get_post_time_returns_false_with_null_or_non_existing_post() { 953 917 $this->assertFalse( get_post_time() ); 954 }955 956 /**957 * @ticket 28310958 */959 function test_get_post_time_returns_false_with_format_and_null_post() {960 918 $this->assertFalse( get_post_time( 'h:i:s' ) ); 961 }962 963 /**964 * @ticket 28310965 */966 function test_get_post_time_returns_false_with_post_that_is_not_found() {967 919 $this->assertFalse( get_post_time( '', false, 9 ) ); 968 }969 970 /**971 * @ticket 28310972 */973 function test_get_post_time_returns_false_with_format_and_post_that_is_not_found() {974 920 $this->assertFalse( get_post_time( 'h:i:s', false, 9 ) ); 975 921 } … … 986 932 * @ticket 28310 987 933 */ 988 function test_get_post_modified_time_returns_false_with_null_ post() {934 function test_get_post_modified_time_returns_false_with_null_or_non_existing_post() { 989 935 $this->assertFalse( get_post_modified_time() ); 990 }991 992 /**993 * @ticket 28310994 */995 function test_get_post_modified_time_returns_false_with_format_and_null_post() {996 936 $this->assertFalse( get_post_modified_time( 'h:i:s' ) ); 997 }998 999 /**1000 * @ticket 283101001 */1002 function test_get_post_modified_time_returns_false_with_post_that_is_not_found() {1003 937 $this->assertFalse( get_post_modified_time( '', false, 9 ) ); 1004 }1005 1006 /**1007 * @ticket 283101008 */1009 function test_get_post_modified_time_returns_false_with_format_and_post_that_is_not_found() {1010 938 $this->assertFalse( get_post_modified_time( 'h:i:s', false, 9 ) ); 1011 939 } … … 1021 949 * @ticket 28310 1022 950 */ 1023 function test_mysql2date_returns_gmt_ unix_timestamp() {951 function test_mysql2date_returns_gmt_or_unix_timestamp() { 1024 952 $this->assertEquals( '441013392', mysql2date( 'G', '1983-12-23 07:43:12' ) ); 1025 }1026 1027 /**1028 * @ticket 283101029 */1030 function test_mysql2date_returns_unix_timestamp() {1031 953 $this->assertEquals( '441013392', mysql2date( 'U', '1983-12-23 07:43:12' ) ); 1032 954 }
Note: See TracChangeset
for help on using the changeset viewer.