Make WordPress Core


Ignore:
Timestamp:
08/08/2022 11:33:11 PM (3 years ago)
Author:
azaozz
Message:

Build/Test Tools: Add @covers tags to the options tests.

Props pbearne, jrf, hellofromTonya, patopaiar, ironprogrammer, antonvlasenko, SergeyBiryukov, costdev.
See #39265.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/option/updateOption.php

    r48937 r53865  
    77    /**
    88     * @ticket 31047
     9     *
     10     * @covers ::add_filter
     11     * @covers ::update_option
     12     * @covers ::remove_filter
    913     */
    1014    public function test_should_respect_default_option_filter_when_option_does_not_yet_exist_in_database() {
     
    1923    /**
    2024     * @ticket 26394
     25     *
     26     * @covers ::update_option
     27     * @covers ::wp_load_alloptions
     28     * @covers ::get_option
    2129     */
    2230    public function test_should_set_autoload_yes_for_nonexistent_option_when_autoload_param_is_missing() {
     
    3947    /**
    4048     * @ticket 26394
     49     *
     50     * @covers ::update_option
     51     * @covers ::wp_load_alloptions
     52     * @covers ::get_option
    4153     */
    4254    public function test_should_set_autoload_yes_for_nonexistent_option_when_autoload_param_is_yes() {
     
    5971    /**
    6072     * @ticket 26394
     73     *
     74     * @covers ::update_option
     75     * @covers ::wp_load_alloptions
     76     * @covers ::get_option
    6177     */
    6278    public function test_should_set_autoload_no_for_nonexistent_option_when_autoload_param_is_no() {
     
    8096    /**
    8197     * @ticket 26394
     98     *
     99     * @covers ::update_option
     100     * @covers ::wp_load_alloptions
     101     * @covers ::get_option
    82102     */
    83103    public function test_should_set_autoload_no_for_nonexistent_option_when_autoload_param_is_false() {
     
    101121    /**
    102122     * @ticket 26394
     123     *
     124     * @covers ::update_option
     125     * @covers ::wp_load_alloptions
     126     * @covers ::get_option
    103127     */
    104128    public function test_autoload_should_be_updated_for_existing_option_when_value_is_changed() {
     
    122146    /**
    123147     * @ticket 26394
     148     *
     149     * @covers ::update_option
     150     * @covers ::wp_load_alloptions
     151     * @covers ::get_option
    124152     */
    125153    public function test_autoload_should_not_be_updated_for_existing_option_when_value_is_unchanged() {
     
    144172    /**
    145173     * @ticket 26394
     174     *
     175     * @covers ::update_option
     176     * @covers ::wp_load_alloptions
     177     * @covers ::get_option
    146178     */
    147179    public function test_autoload_should_not_be_updated_for_existing_option_when_value_is_changed_but_no_value_of_autoload_is_provided() {
     
    161193        $value  = get_option( 'foo' );
    162194
    163         // 'foo' should still be autoload=yes, so we should see no additional querios.
     195        // 'foo' should still be autoload=yes, so we should see no additional queries.
    164196        $this->assertSame( $before, $wpdb->num_queries );
    165197        $this->assertSame( $value, 'bar2' );
     
    168200    /**
    169201     * @ticket 38903
     202     *
     203     * @covers ::add_option
     204     * @covers ::get_num_queries
     205     * @covers ::update_option
    170206     */
    171207    public function test_update_option_array_with_object() {
Note: See TracChangeset for help on using the changeset viewer.