{"id":5644,"date":"2014-04-04T15:16:52","date_gmt":"2014-04-04T15:16:52","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/04\/04\/phpunit-reports-a-phpunit_framework_exception-collection-of-common-programming-errors\/"},"modified":"2014-04-04T15:16:52","modified_gmt":"2014-04-04T15:16:52","slug":"phpunit-reports-a-phpunit_framework_exception-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/04\/04\/phpunit-reports-a-phpunit_framework_exception-collection-of-common-programming-errors\/","title":{"rendered":"PHPUnit reports a PHPUnit_Framework_Exception-Collection of common programming errors"},"content":{"rendered":"<p>I added a simple test to a bundle.<\/p>\n<p>As suggested in the manual I tried to have PHPUnit load the configuration with:<\/p>\n<pre><code>phpunit -c \/app\n<\/code><\/pre>\n<p>phpunit.xml looks like this:<\/p>\n<pre><code>\n\n\n\n\n    \n        \n            ..\/src\/*Bundle\/Tests\n        \n    \n \n<\/code><\/pre>\n<p>The error message I get is:<\/p>\n<pre><code>root@h0x03:\/var\/www\/fi\/FrontendIntegrator# phpunit -c app\/\nPHP Fatal error:  Uncaught exception 'PHPUnit_Framework_Exception' with message 'Neither \"Project Test Suite.php\" nor \"Project Test Suite.php\" could be opened.' in \/usr\/share\/php\/PHPUnit\/Util\/Skeleton\/Test.php:102\nStack trace:\n#0 \/usr\/share\/php\/PHPUnit\/TextUI\/Command.php(157): PHPUnit_Util_Skeleton_Test-&gt;__construct('Project Test Su...', '')\n#1 \/usr\/share\/php\/PHPUnit\/TextUI\/Command.php(129): PHPUnit_TextUI_Command-&gt;run(Array, true)\n#2 \/usr\/bin\/phpunit(49): PHPUnit_TextUI_Command::main()\n#3 {main}\n  thrown in \/usr\/share\/php\/PHPUnit\/Util\/Skeleton\/Test.php on line 102\n<\/code><\/pre>\n<p>PHPUnit apparently loads the file and tries to find a PHP-file named after the test suites name. I cannot find any information on why it does so or how such a file should look like.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I added a simple test to a bundle. As suggested in the manual I tried to have PHPUnit load the configuration with: phpunit -c \/app phpunit.xml looks like this: ..\/src\/*Bundle\/Tests The error message I get is: root@h0x03:\/var\/www\/fi\/FrontendIntegrator# phpunit -c app\/ PHP Fatal error: Uncaught exception &#8216;PHPUnit_Framework_Exception&#8217; with message &#8216;Neither &#8220;Project Test Suite.php&#8221; nor &#8220;Project Test [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-5644","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5644","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=5644"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5644\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=5644"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=5644"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=5644"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}