Make WordPress Core

Ticket #31126: 31126.diff

File 31126.diff, 1.4 KB (added by pareshradadiya, 9 years ago)
  • tests/phpunit/tests/dependencies/scripts.php

     
    155155                // No scripts left to print
    156156                $this->assertEquals( '', get_echo( 'wp_print_scripts' ) );
    157157        }
     158
     159    /**
     160     * Testing 'wp_register_script' return boolean success/failure value
     161     * @ticket 31126
     162     */
     163    function test_wp_register_script() {
     164
     165        $this->assertTrue( wp_register_script( 'duplicate-handler', 'http://example.com' ) );
     166        $this->assertFalse( wp_register_script( 'duplicate-handler', 'http://example.com' ) );
     167    }
     168
    158169}
  • tests/phpunit/tests/dependencies/styles.php

     
    229229                $this->assertEquals( $expected, get_echo( 'wp_print_styles' ) );
    230230        }
    231231
     232    /**
     233     * Testing 'wp_register_style' return boolean success/failure value
     234     * @ticket 31126
     235     */
     236    function test_wp_register_style(){
     237
     238        $this->assertTrue( wp_register_style( 'duplicate-handler', 'http://example.com' ) );
     239        $this->assertFalse( wp_register_style( 'duplicate-handler', 'http://example.com' ) );
     240    }
     241
    232242}