Symfony2 functional testing InvalidArgumentException: The current node list is empty

前端 未结 7 753
伪装坚强ぢ
伪装坚强ぢ 2020-12-18 23:41

I get \"InvalidArgumentException: The current node list is empty.\" running functional tests through PHPUnit. Here is test i wrote:

public function testAdd()         


        
7条回答
  •  被撕碎了的回忆
    2020-12-19 00:27

    As a follow up to what @greg0ire wrote, check to see if

    var_dump($client->getResponse()->getContent());
    

    Returns a redirect page instead of the actual content. If so, you can add this:

    $client->followRedirects(true);
    

提交回复
热议问题