bobbingwide / oik-privacy-policy

Privacy policy page generator
https://www.oik-plugins.com/oik-plugins/privacy-policy-page-generator/
GNU General Public License v2.0
4 stars 0 forks source link

Test with WordPress 6.6 and PHP 8.3 #9

Closed bobbingwide closed 2 weeks ago

bobbingwide commented 2 weeks ago

I just ran the PHPUnit tests with WordPress 6.6 and they failed.

1) Tests_admin_oik_privacy_policy::test_oik_privacy_policy_options_do_page
Failed asserting that two arrays are equal.
--- Expected
+++ Actual
@@ @@
     528 => '</form>'
     529 => '</div>'
     530 => '</div>'
-    531 => '<p>'
-    532 => '<!--start ecolumn-->'
+    531 => '<p> <!--start ecolumn--> </div>'
+    532 => '</p>'
     533 => '</div>'
-    534 => '</div>'
+    534 => '</p>'
...

Is this a problem with wpautop() or my PHPUnit test code?

bobbingwide commented 2 weeks ago

Is this a problem with wpautop() or my PHPUnit test code?

This problem occurs when bigram is activated.

Workaround

Fix

I tried changing both tag_break() and the bigram code, but this introduced other problems.

Then I realised I could add some logic in the affected test cases to remove the filter functions attached to render_block_. The test cases now run successfully regardless of the activation status of the bigram plugin.

bobbingwide commented 2 weeks ago

Delivered in v1.4.7