-
-
Notifications
You must be signed in to change notification settings - Fork 272
Description
Description
the PodsTest::test_shortcode_pods() method has some failing unit tests:
1) PodsTest: Test_shortcode_pods
Test tests/codeception/wpunit/Pods/Shortcode/PodsTest.php:test_shortcode_pods
Failed asserting that two strings are equal.
- Expected | + Actual
@@ @@
-'5'
+'<!-- pods:access-notices/user/hidden-by-setting {"object_type":"pod","object_name":"test_pods","item_id":null} -->'
[...]
2) PodsTest: Test_shortcode_pods_field_in_shortcode
Test tests/codeception/wpunit/Pods/Shortcode/PodsTest.php:test_shortcode_pods_field_in_shortcode
Failed asserting that two strings are equal.
- Expected | + Actual
@@ @@
-'5'
+''
[...]
3) PodsTest: Test_shortcode_pods_form
Test tests/codeception/wpunit/Pods/Shortcode/PodsTest.php:test_shortcode_pods_form
Failed asserting that '<!-- pods:access-notices/user/hidden-by-setting {"object_type":"pod","object_name":"test_pods","item_id":null} -->' contains "Anonymous form submissions are not enabled for this site".
[...]
4) PodsTest: Test_shortcode_pods_form_with_anon_enabled
Test tests/codeception/wpunit/Pods/Shortcode/PodsTest.php:test_shortcode_pods_form_with_anon_enabled
Failed asserting that '<!-- pods:access-notices/user/hidden-by-setting {"object_type":"pod","object_name":"test_pods","item_id":null} -->' contains "Anonymous form submissions are not compatible with sessions on this site".
[...]
5) PodsTest: Test_shortcode_pods_form_with_anon_enabled_and_compatible
Test tests/codeception/wpunit/Pods/Shortcode/PodsTest.php:test_shortcode_pods_form_with_anon_enabled_and_compatible
Failed asserting that '<!-- pods:access-notices/user/hidden-by-setting {"object_type":"pod","object_name":"test_pods","item_id":null} -->' contains "<form".
[...]
it seems that these test failures are related to the setup of the pod item earlier
$this->pod_id = $api->save_pod( array(
'type' => 'pod',
'name' => $this->pod_name,
) );
it seems the 'public'=> 1 option is missing from the parameters. When added, the tests pass.
With this option the tests pass.
Version
release 3.3.5
Testing Instructions
run vendor/bin/codecept run wpunit tests/codeception/wpunit/Pods/Shortcode/PodsTest.php:test_shortcode_pods -v from the pods dir.
Screenshots / Screencast
No response
Possible Workaround
No response
Site Health Information
Pods Package
Reactions are currently unavailable