- Timestamp:
- 06/09/2021 07:41:47 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/rest-api/rest-widgets-controller.php
r51088 r51135 382 382 $data = $response->get_data(); 383 383 $data = $this->remove_links( $data ); 384 $this->assert EqualSets(384 $this->assertSameIgnoreEOL( 385 385 array( 386 386 array( … … 388 388 'id_base' => 'text', 389 389 'sidebar' => 'sidebar-1', 390 'rendered' => '<div class="textwidget">Custom text test</div>', 391 'rendered_form' => '<input id="widget-text-1-title" name="widget-text[1][title]" class="title sync-input" type="hidden" value="">' . "\n" . 392 ' <textarea id="widget-text-1-text" name="widget-text[1][text]" class="text sync-input" hidden>Custom text test</textarea>' . "\n" . 393 ' <input id="widget-text-1-filter" name="widget-text[1][filter]" class="filter sync-input" type="hidden" value="on">' . "\n" . 394 ' <input id="widget-text-1-visual" name="widget-text[1][visual]" class="visual sync-input" type="hidden" value="on">', 390 395 'instance' => array( 391 396 'encoded' => base64_encode( … … 407 412 ), 408 413 ), 409 'rendered' => '<div class="textwidget">Custom text test</div>',410 'rendered_form' => '<input id="widget-text-1-title" name="widget-text[1][title]" class="title sync-input" type="hidden" value="">' . "\n" .411 ' <textarea id="widget-text-1-text" name="widget-text[1][text]" class="text sync-input" hidden>Custom text test</textarea>' . "\n" .412 ' <input id="widget-text-1-filter" name="widget-text[1][filter]" class="filter sync-input" type="hidden" value="on">' . "\n" .413 ' <input id="widget-text-1-visual" name="widget-text[1][visual]" class="visual sync-input" type="hidden" value="on">',414 414 ), 415 415 array( … … 1208 1208 $response = rest_do_request( $request ); 1209 1209 1210 $this->assert EqualSets(1210 $this->assertSameIgnoreEOL( 1211 1211 array( 1212 1212 'id' => 'text-1', 1213 1213 'id_base' => 'text', 1214 1214 'sidebar' => 'wp_inactive_widgets', 1215 'rendered' => '', 1216 'rendered_form' => '<input id="widget-text-1-title" name="widget-text[1][title]" class="title sync-input" type="hidden" value="">' . "\n" . 1217 ' <textarea id="widget-text-1-text" name="widget-text[1][text]" class="text sync-input" hidden>Custom text test</textarea>' . "\n" . 1218 ' <input id="widget-text-1-filter" name="widget-text[1][filter]" class="filter sync-input" type="hidden" value="on">' . "\n" . 1219 ' <input id="widget-text-1-visual" name="widget-text[1][visual]" class="visual sync-input" type="hidden" value="on">', 1215 1220 'instance' => array( 1216 1221 'encoded' => base64_encode( … … 1232 1237 ), 1233 1238 ), 1234 'rendered' => '',1235 'rendered_form' => '<input id="widget-text-1-title" name="widget-text[1][title]" class="title sync-input" type="hidden" value="">' . "\n" .1236 ' <textarea id="widget-text-1-text" name="widget-text[1][text]" class="text sync-input" hidden>Custom text test</textarea>' . "\n" .1237 ' <input id="widget-text-1-filter" name="widget-text[1][filter]" class="filter sync-input" type="hidden" value="on">' . "\n" .1238 ' <input id="widget-text-1-visual" name="widget-text[1][visual]" class="visual sync-input" type="hidden" value="on">',1239 1239 ), 1240 1240 $response->get_data() … … 1265 1265 $response = rest_do_request( $request ); 1266 1266 1267 $this->assert EqualSets(1267 $this->assertSameIgnoreEOL( 1268 1268 array( 1269 1269 'deleted' => true, … … 1273 1273 'id_base' => 'text', 1274 1274 'sidebar' => 'sidebar-1', 1275 'rendered' => '<div class="textwidget">Custom text test</div>', 1276 'rendered_form' => '<input id="widget-text-1-title" name="widget-text[1][title]" class="title sync-input" type="hidden" value="">' . "\n" . 1277 ' <textarea id="widget-text-1-text" name="widget-text[1][text]" class="text sync-input" hidden>Custom text test</textarea>' . "\n" . 1278 ' <input id="widget-text-1-filter" name="widget-text[1][filter]" class="filter sync-input" type="hidden" value="on">' . "\n" . 1279 ' <input id="widget-text-1-visual" name="widget-text[1][visual]" class="visual sync-input" type="hidden" value="on">', 1275 1280 'instance' => array( 1276 1281 'encoded' => base64_encode( … … 1292 1297 ), 1293 1298 ), 1294 'rendered' => '<div class="textwidget">Custom text test</div>',1295 'rendered_form' => '<input id="widget-text-1-title" name="widget-text[1][title]" class="title sync-input" type="hidden" value="">' . "\n" .1296 ' <textarea id="widget-text-1-text" name="widget-text[1][text]" class="text sync-input" hidden>Custom text test</textarea>' . "\n" .1297 ' <input id="widget-text-1-filter" name="widget-text[1][filter]" class="filter sync-input" type="hidden" value="on">' . "\n" .1298 ' <input id="widget-text-1-visual" name="widget-text[1][visual]" class="visual sync-input" type="hidden" value="on">',1299 1299 1300 1300 ),
Note: See TracChangeset
for help on using the changeset viewer.