As a user when I load the options page (http://chargify.local/wp/wp-admin/admin.php?page=chargify_options) AFTER activating the plugin but BEFORE setting any API credentials, I receive the following:
Warning: Invalid argument supplied for foreach() in /vagrant/wp/wp-includes/class-wp-list-util.php on line 168
This warning appeared for the Chargify Products field as it was trying list products when connecting to the API gave back an empty response.
As a unit test I should test for this conditions to make sure this situation is handled and tested accordingly.
As a user when I load the options page (http://chargify.local/wp/wp-admin/admin.php?page=chargify_options) AFTER activating the plugin but BEFORE setting any API credentials, I receive the following:
Warning: Invalid argument supplied for foreach() in /vagrant/wp/wp-includes/class-wp-list-util.php on line 168
This warning appeared for the Chargify Products field as it was trying list products when connecting to the API gave back an empty response.As a unit test I should test for this conditions to make sure this situation is handled and tested accordingly.