我正在使用Laracast\Integrated库来测试我的web应用程序。我有一个这样的表单:
<select multiple name="resource[]">
<option value="Coal">Coal</option>
<option value="Another">Aluminum</option>
.
.
</select>我的测试用例是:
$this->select('resource[]' , ['Coal' , 'Another']);我得到了错误:
Symfony\Component\CssSelector\Exception\SyntaxErrorException: Expected identifier│ or "*", but <delimiter "]" at 11> found.请帮帮我。
发布于 2015-09-22 19:34:40
我通过help Gal得到的解决方案:
/**@test*/
public function add_new()
{
$this->storeInput('resource', ['6PGM+Au' ,'Coal'], true)
->andPress('Submit')
}
public function storeInput($element, $text, $force = false)
{
if ($force) {
$this->inputs[$element] = $text;
return $this;
}
else {
return parent::storeInput($element, $text);
}
}https://stackoverflow.com/questions/32688060
复制相似问题