Changeset 44269 for trunk/tests/phpunit/tests/blocks/block-type.php
- Timestamp:
- 12/17/2018 05:59:44 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/5.0 merged: 43918
- Property svn:mergeinfo changed
-
trunk/tests/phpunit/tests/blocks/block-type.php
r44127 r44269 169 169 'wrongTypeDefaulted' => 5, 170 170 /* missingDefaulted */ 171 'undefined' => 'omit', 171 'undefined' => 'include', 172 'intendedNull' => null, 172 173 ); 173 174 … … 190 191 'default' => 'define', 191 192 ), 193 'intendedNull' => array( 194 'type' => array( 'string', 'null' ), 195 'default' => 'wrong', 196 ), 192 197 ), 193 198 ) … … 199 204 array( 200 205 'correct' => 'include', 201 'wrongType' => null,206 /* wrongType */ 202 207 'wrongTypeDefaulted' => 'defaulted', 203 208 'missingDefaulted' => 'define', 209 'undefined' => 'include', 210 'intendedNull' => null, 204 211 ), 205 212 $prepared_attributes 206 213 ); 214 } 215 216 /** 217 * @ticket 45145 218 */ 219 function test_prepare_attributes_none_defined() { 220 $attributes = array( 'exists' => 'keep' ); 221 222 $block_type = new WP_Block_Type( 'core/dummy', array() ); 223 224 $prepared_attributes = $block_type->prepare_attributes_for_render( $attributes ); 225 226 $this->assertEquals( $attributes, $prepared_attributes ); 207 227 } 208 228
Note: See TracChangeset
for help on using the changeset viewer.