mirror of
git://develop.git.wordpress.org/
synced 2025-03-26 14:52:37 +01:00
Once the `test_process_directives_when_block_is_filtered()` method has run, the named `test_render_block_data()` function declared nested within becomes part of the global namespace, which could cause problems for other tests. Quite apart from the fact that the name starting with `test_` is confusing (as methods prefixed with `test_` are supposed to be test methods to be run by PHPUnit). Using a closure for this callback fixes the issue. Declared as `static` for a micro-optimization. Follow-up to [57826]. Props jrf, hellofromTonya. See #61530. git-svn-id: https://develop.svn.wordpress.org/trunk@58738 602fd350-edb4-49c9-b593-d223f7449a82