0
這個問題對我來說就是找到一種方法來改進我的測試。當我測試的代碼,我通常使用此代碼:PHPUnit從測試中得到很好的反饋
$this->assertContains('textExample', $client->getResponse()->getContent());
當測試得到OK一切都是正確的,但是當測試從PHPUnit的失敗反饋是如此沉重,因爲PHP單位回聲終端的所有頁面進入搜索文本示例。 我會篩選$ client-> getResponse() - > getContent()),並在我搜索它的網站的精確部分搜索textExample(div,h2 ...),並且沒有那個重要的反饋形式phpunit。
我希望我很清楚,如果不是,我會嘗試重新解釋。
以及哪種方式來使用它?我認爲像$ client-> getResponse() - > getContent() - > filter('div .inThisDiv') – NicolaPez
@NicolaPez我用get_class_methods更新了答案,因此您可以檢查$ e上的可用方法 – lloiacono
@NicolaPez我沒有看到更新,這對你仍然有用嗎?我的回答有幫助嗎? – lloiacono