Changeset 10765 for sites/trunk/wordpress.org/public_html/wp-content/plugins/handbook/phpunit/tests/init.php
- Timestamp:
- 03/04/2021 11:49:42 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/handbook/phpunit/tests/init.php
r10761 r10765 70 70 71 71 /* 72 * get_handbook() 73 */ 74 75 public function test_get_handbook_for_invalid_handbook() { 76 $this->assertFalse( WPorg_Handbook_Init::get_handbook( 'nonexistent-handbook' ) ); 77 } 78 79 public function test_get_handbook() { 80 $handbook = WPorg_Handbook_Init::get_handbook( 'handbook' ); 81 82 $this->assertTrue( is_a( $handbook, 'WPorg_Handbook' ) ); 83 $this->assertEquals( 'handbook', $handbook->post_type ); 84 } 85 86 public function test_get_handbook_when_multiple_handbooks_present() { 87 reinit_handbooks( [ 'plugins-handbook', 'themes-handbook' ], 'post_types' ); 88 89 $handbook = WPorg_Handbook_Init::get_handbook( 'plugins-handbook' ); 90 91 $this->assertTrue( is_a( $handbook, 'WPorg_Handbook' ) ); 92 $this->assertEquals( 'plugins-handbook', $handbook->post_type ); 93 } 94 95 /* 72 96 * get_post_types() 73 97 */
Note: See TracChangeset
for help on using the changeset viewer.