I get \"InvalidArgumentException: The current node list is empty.\" running functional tests through PHPUnit. Here is test i wrote:
public function testAdd()
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);