Changeset 52942 for trunk/tests/phpunit/tests/blocks/editor.php
- Timestamp:
- 03/17/2022 03:35:13 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/blocks/editor.php
r52349 r52942 81 81 $context = new WP_Block_Editor_Context(); 82 82 83 $this->assertSame( 'core/edit-post', $context->name ); 83 84 $this->assertNull( $context->post ); 84 85 } … … 90 91 $context = new WP_Block_Editor_Context( array( 'post' => get_post() ) ); 91 92 93 $this->assertSame( 'core/edit-post', $context->name ); 92 94 $this->assertSame( get_post(), $context->post ); 95 } 96 97 /** 98 * @ticket 55301 99 */ 100 public function test_block_editor_context_widgets() { 101 $context = new WP_Block_Editor_Context( array( 'name' => 'core/edit-widgets' ) ); 102 103 $this->assertSame( 'core/edit-widgets', $context->name ); 104 $this->assertNull( $context->post ); 105 } 106 107 /** 108 * @ticket 55301 109 */ 110 public function test_block_editor_context_widgets_customizer() { 111 $context = new WP_Block_Editor_Context( array( 'name' => 'core/customize-widgets' ) ); 112 113 $this->assertSame( 'core/customize-widgets', $context->name ); 114 $this->assertNull( $context->post ); 115 } 116 117 /** 118 * @ticket 55301 119 */ 120 public function test_block_editor_context_site() { 121 $context = new WP_Block_Editor_Context( array( 'name' => 'core/edit-site' ) ); 122 123 $this->assertSame( 'core/edit-site', $context->name ); 124 $this->assertNull( $context->post ); 93 125 } 94 126
Note: See TracChangeset
for help on using the changeset viewer.