When I wrote a test
class MyTest extends PHPUnit_Framework_TestCase {
I get
Fatal error: Class 'PHPUnit_Framework_TestCase' not found in /home/test/workspace/myproject/www/wp-content/plugins/myth/tests/tests.php on line 33
Is there any documentation on how to actually implement these tests? Do I need to use require_once?
Is there a problem with plugins loaded in wrong order?
I just installed this plugin and I get
Notice: Undefined index: Submit in /home/cristiroma/workspace/geg/www/wp-content/plugins/wp-unit/WPUnit.php on line 53
I think the code should look like if(isset($_POST['Submit']))
I am trying wp-unit and noticed that when you turn on WP_DEBUG, which might be useful when you debug your testing plugin, you see few warning messages on wp-unit itself.
arrange_results($failuresKeys,'failed');
caused undefined variable warning so initialize it like,
$faulresKeys = array()
arrange_results($failuresKeys,'failed');
if($_POST['Submit'] =='Run')
caused another warning when method is get so how about this?
if(array_key_exists('Submit', $_POST) &&
$_POST['Submit'] =='Run')
Thanks
]]>Well I’ve just wasted 3 hours because of the sere lack of error messages.
The full error message from PHPUnit would be extremely nice. But the error message that causes the test to be listed in the list of tests is extremely important. So can you please look into showing them, debuging blind isn’t cool.
Thanks
]]>