symfony/symfony — pull request #2418 by dbu (2011-10-17 11:54:54+00:00)
Title: fixing WebTastCase when kernel is not found

i was using a phpunit.xml in a bundle that did not define KERNEL_DIR. instead of an exception i got a fatal error:

PHP Fatal error: Call to a member function getBasename() on a non-object in .../cmf-sandbox/vendor/symfony/src/Symfony/Bundle/FrameworkBundle/Test/WebTestCase.php on line 126

i tried to figure out whats wrong, but it seems something weird with the Finder class

list($key, $val) = each($finder);
var_dump($key, $val);

gives me:
string(37) "Symfony\Component\Finder\Findermode"
int(0)

but then the array from that iterator is empty. maybe there is something weird with my php version but as it can apparently happen, i suggest this pull request.

as this is a place where people will start to see they have a problem, i thought adding something to the exception could help. not sure if you like the url in the message, maybe it should rather point to a cookbook entry explaining the WebTestCase?