- Timestamp:
- 05/30/2024 01:14:15 AM (12 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/theme/wpAddGlobalStylesForBlocks.php
r56682 r58241 38 38 /** 39 39 * @ticket 56915 40 * @ticket 61165 40 41 */ 41 42 public function test_third_party_blocks_inline_styles_not_register_to_global_styles() { … … 46 47 47 48 $this->assertNotContains( 48 ' .wp-block-my-third-party-block{background-color: hotpink;}',49 ':root :where(.wp-block-my-third-party-block){background-color: hotpink;}', 49 50 $this->get_global_styles() 50 51 ); … … 53 54 /** 54 55 * @ticket 56915 56 * @ticket 61165 55 57 */ 56 58 public function test_third_party_blocks_inline_styles_get_registered_to_global_styles() { … … 60 62 61 63 $this->assertNotContains( 62 ' .wp-block-my-third-party-block{background-color: hotpink;}',64 ':root :where(.wp-block-my-third-party-block){background-color: hotpink;}', 63 65 $this->get_global_styles(), 64 66 'Third party block inline style should not be registered before running wp_add_global_styles_for_blocks()' … … 68 70 69 71 $this->assertContains( 70 ' .wp-block-my-third-party-block{background-color: hotpink;}',72 ':root :where(.wp-block-my-third-party-block){background-color: hotpink;}', 71 73 $this->get_global_styles(), 72 74 'Third party block inline style should be registered after running wp_add_global_styles_for_blocks()' … … 76 78 /** 77 79 * @ticket 56915 80 * @ticket 61165 78 81 */ 79 82 public function test_third_party_blocks_inline_styles_get_registered_to_global_styles_when_per_block() { … … 84 87 85 88 $this->assertNotContains( 86 ' .wp-block-my-third-party-block{background-color: hotpink;}',89 ':root :where(.wp-block-my-third-party-block){background-color: hotpink;}', 87 90 $this->get_global_styles(), 88 91 'Third party block inline style should not be registered before running wp_add_global_styles_for_blocks()' … … 92 95 93 96 $this->assertContains( 94 ' .wp-block-my-third-party-block{background-color: hotpink;}',97 ':root :where(.wp-block-my-third-party-block){background-color: hotpink;}', 95 98 $this->get_global_styles(), 96 99 'Third party block inline style should be registered after running wp_add_global_styles_for_blocks()' … … 100 103 /** 101 104 * @ticket 56915 105 * @ticket 61165 102 106 */ 103 107 public function test_third_party_blocks_inline_styles_get_rendered_when_per_block() { … … 112 116 113 117 $this->assertStringContainsString( 114 ' .wp-block-my-third-party-block{background-color: hotpink;}',118 ':root :where(.wp-block-my-third-party-block){background-color: hotpink;}', 115 119 $actual, 116 120 'Third party block inline style should render' … … 125 129 /** 126 130 * @ticket 56915 131 * @ticket 61165 127 132 */ 128 133 public function test_blocks_inline_styles_get_rendered() { … … 134 139 135 140 $this->assertStringContainsString( 136 ' .wp-block-my-third-party-block{background-color: hotpink;}',141 ':root :where(.wp-block-my-third-party-block){background-color: hotpink;}', 137 142 $actual, 138 143 'Third party block inline style should render' … … 147 152 /** 148 153 * @ticket 57868 154 * @ticket 61165 149 155 */ 150 156 public function test_third_party_blocks_inline_styles_for_elements_get_rendered_when_per_block() { … … 159 165 160 166 $this->assertStringContainsString( 161 ' .wp-block-my-third-party-block cite{color: white;}',167 ':root :where(.wp-block-my-third-party-block cite){color: white;}', 162 168 $actual 163 169 ); … … 166 172 /** 167 173 * @ticket 57868 174 * @ticket 61165 168 175 */ 169 176 public function test_third_party_blocks_inline_styles_for_elements_get_rendered() { … … 175 182 176 183 $this->assertStringContainsString( 177 ' .wp-block-my-third-party-block cite{color: white;}',184 ':root :where(.wp-block-my-third-party-block cite){color: white;}', 178 185 $actual 179 186 );
Note: See TracChangeset
for help on using the changeset viewer.