我想在PHPUnit中運行測試並獲取此錯誤。類__PHP_Incomplete_Class沒有unserializer
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的設置:
processIsolation = "true"
在此先感謝。
你試過Google嗎? https://www.google.co.uk/search?q=Class+__PHP_Incomplete_Class+has+no+unserializer似乎具體到PHPUnit的一個問題,Symfony2的 – Pudge601
http://stackoverflow.com/a/14514753/921154可能相關。當使用一個將PDO連接放到其全局範圍的框架時,解決方案是將該變量添加到backupglobalblacklist:http://phpunit.de/manual/3.7/en/fixtures.html#idp7165424 – qrazi