Making WordPress.org

Changeset 10770


Ignore:
Timestamp:
03/05/2021 12:23:06 AM (5 years ago)
Author:
coffee2code
Message:

Handbooks, Unit tests: Add test for WPorg_Init::reset().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/handbook/phpunit/tests/init.php

    r10769 r10770  
    161161
    162162    /*
     163     * reset()
     164     */
     165
     166    public function test_reset() {
     167        $this->test_get_post_types_custom();
     168
     169        $this->assertEquals( 2, count( WPorg_Handbook_Init::get_handbook_objects() ) );
     170        $this->assertEquals( 2, count( WPorg_Handbook_Init::get_post_types() ) );
     171
     172        WPorg_Handbook_Init::reset();
     173
     174        $this->assertEmpty( count( WPorg_Handbook_Init::get_handbook_objects() ) );
     175        $this->assertEmpty( count( WPorg_Handbook_Init::get_post_types() ) );
     176    }
     177
     178    /*
    163179     * get_handbooks_config()
    164180     */
Note: See TracChangeset for help on using the changeset viewer.