WordPress.org

Make WordPress Core

Ticket #33885: 33885.5.3.diff

File 33885.5.3.diff, 1.3 KB (added by lbenicio, 3 years ago)

Unit tests for #33885.5

  • tests/phpunit/tests/admin/includesTemplate.php

    diff --git a/tests/phpunit/tests/admin/includesTemplate.php b/tests/phpunit/tests/admin/includesTemplate.php
    index ebd019c858..c0bc3b8884 100644
    a b class Tests_Admin_includesTemplate extends WP_UnitTestCase { 
    3333
    3434                $this->assertEquals( ' selected=\'selected\'', selected( false, false, false ) );
    3535                $this->assertEquals( ' checked=\'checked\'', checked( false, false, false ) );
    36 
    37 
    3836        }
    3937
    4038        function test_notequal() {
    class Tests_Admin_includesTemplate extends WP_UnitTestCase { 
    4846                $this->assertEquals( '', checked( 0, false, false ) );
    4947        }
    5048
    51         function test_post_meta() {
    52                 $post = get_post( $post );
    53                 $keys = apply_filters( 'postmeta_form_keys', null, $post );
    54 
    55                 if ( $keys ) {
    56                         natcasesort( $keys );
    57                         $meta_key_input_id = 'metakeyselect';
    58                 } else {
    59                         $meta_key_input_id = 'metakeyinput';
    60                 }
    61 
    62                 $this->assertNotEmpty($keys);
    63 
    64         }
    65 
    6649        public function test_add_meta_box() {
    6750                global $wp_meta_boxes;
    6851
    class Tests_Admin_includesTemplate extends WP_UnitTestCase { 
    124107                $this->assertFalse( $wp_meta_boxes['comment']['advanced']['default']['testbox1'] );
    125108                $this->assertFalse( $wp_meta_boxes['attachment']['advanced']['default']['testbox1'] );
    126109        }
     110
    127111}