[wp-trac] [WordPress Trac] #52364: Reusable blocks: Add tests for recursion, subsequent instances

WordPress Trac noreply at wordpress.org
Wed Feb 17 00:56:56 UTC 2021


#52364: Reusable blocks: Add tests for recursion, subsequent instances
---------------------------------------------+---------------------
 Reporter:  Bernhard Reiter                  |       Owner:  (none)
     Type:  task (blessed)                   |      Status:  new
 Priority:  normal                           |   Milestone:  5.7
Component:  Editor                           |     Version:  trunk
 Severity:  normal                           |  Resolution:
 Keywords:  has-patch has-unit-tests commit  |     Focuses:
---------------------------------------------+---------------------
Changes (by peterwilsoncc):

 * keywords:  has-patch has-unit-tests => has-patch has-unit-tests commit


Comment:

 In [attachment:"52364.diff"] :

 * bring the PR patch in to trac
 * As many globals are reset between tests, I've called
 `$block_type->render()` twice in `test_render_subsequent()` to make sure
 any relevant globals haven't been reset since the previous test.
 * All post objects are reset to their original state at the end of each
 test, I've removed the manual call to `wp_update_post()` at the end of
 `test_recursive_render_warning()` as adds unnecessary database writes to
 the test suite.

 This looks ready to me, marking as such.

 Related #51802.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/52364#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list