尝试使用包含的空格字符测试 uri 失败。uri 是/contact/latestReport/Most recent
. 以下每个试验的结果
当前节点列表为空
试验包括:
$crawler = $client->request('GET', '/contact/latestReport/Most recent');
$crawler = $client->request('GET', '/contact/latestReport/Most%20recent');
$uri = urlencode('/contact/latestReport/Most recent'); $crawler = $client->request('GET', urldecode($uri));
编辑:这是实际的测试代码。它以前的工作版本仅包含/contact/latestReport
. 添加/Most recent
仅在测试中产生错误。[客户要求一份非常相似的报告,因此有现在/Most recent
和/FY to date
版本。] 在开发和生产环境中/contact/latestReport/Most recent
产生了预期的结果。
public function testLatestContacts()
{
$crawler = $this->login();
$crawler = $this->client->request('GET', '/contact/latestReport/Most recent');
$truckee = $this->fixtures->getReference('truckee')->getId();
$form = $crawler->selectButton('Submit')->form();
$form['select_center[center]'] = $truckee;
$crawler = $this->client->submit($form);
$this->assertGreaterThan(0, $crawler->filter('html:contains("No contacts found")')->count());
}