I am trying to run the tests in PHPUnit and getting this error.
Fatal error: Uncaught exception 'ErrorException' with message 'Class __PHP_Incomplete_Class has no unserializer' in /opt/lampp/lib/php/PHPUnit/Util/PHP.php:237
PHP - 5.4.7
PHPUnit - 3.7.21
PHPUnit setting :
processIsolation = "true"
Thanks in advance.
Try clearing the cache for the test environment. php app/console cache:clear --env=test
Here's a debugging solution that might help you finding where the unserialize method is failing:
<?php
ini_set('unserialize_callback_func', 'debug_unserialize');
function debug_unserialize($classname)
{
die(var_dump($classname));
}
That way you will see which classname is causing problem.
Try opening your site in a browser and then again try to execute the test. I am sure it would work, it seems that there is some difference in cache generation by Php Unit and by Symfony
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With