我在Zend框架的工作時,我已經設置了一切,但在單元測試中,我得到一個致命的錯誤:PHPUnit的:開捕致命錯誤檢測
C:\ XAMPP \ htdocs中\ Zend的\模塊\專輯\測試> phpunit PHP可捕獲的致命錯誤:傳遞給Zend \ ServiceManager \ ServiceManager :: __ construct()的Arugment 1必須是在C:\ xampp \ htdocs \ zend \ module \ Album \ test \ bootstrap.php中上線53和在C定義:\ XAMPP \ htdocs中\ Zend的\ vendorframework \ Zend的-的ServiceManager \ SRC \ ServiceManager.php上線144
bootstrap.php中52-58線:
$config = ArrayUtils::merge($baseConfig, $testConfig);
$serviceManager = new ServiceManager(new ServiceManagerConfig());
$serviceManager->setService('ApplicationConfig', $config);
$serviceManager->get('ModuleManager')->loadModules();
static::$serviceManager = $serviceManager;
static::$config = $config;
ServiceManager.php線144-148:
public function __construct(array $config = [])
{
$this->creationContext = $this;
$this->configure($config = []);
}
一些建議,請???
謝謝你的回覆...那麼我需要改變什麼來解決這個錯誤? –
如果你使用的是作曲家,那麼確保它需要你想要的版本。它看起來像你可能需要2.0版本,但它取決於你的項目。 –
我按照以下步驟操作,找不到我出錯的地方 https://framework.zend.com/manual/2.0/en/user-guide/unit-testing.html –