我有ZF1網站,我正在用phpunit測試它。 我想從一個測試(登錄)存儲cookie並將其傳遞給其他測試(發佈消息等)。 或者是否有任何方法來設置身份? 此方法不起作用: class IntegrationalTest extends ControllerTestCase {
protected $identity;
public function test1()
當我嘗試使用以下命令運行失敗的測試: ./vendor/bin/phpunit 我得到這個致命錯誤: PHPUnit 5.7.20 by Sebastian Bergmann and contributors.
PHP Fatal error: Class 'PHPUnit\Framework\ExpectationFailedException'
not found in /var/www
我想創建一個簡單的訪問單元測試,如圖所示in the tutorial。 我的項目使用ZFCUser進行驗證。 結果我的(顯然沒有經過認證)測試儀獲得的302 HTTP response,而不是預期的200 任何想法,我能做些什麼呢?謝謝! 從本教程中的代碼如下所示: public function testAddActionCanBeAccessed()
{
$this->route