尝试使用包含的空格字符测试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
个版本。]在开发和创建中prod环境/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());
}
答案 0 :(得分:0)
吉兹!通过不清除测试缓存再次位。清除缓存时进行测试。