Closed trejjam closed 9 years ago
Hi,
I try to use Tester\DomQuery::css2xpath('input[name=container[item]]') to test Nette\Forms, but css2xpath response: //input[@name='container[item'] instead of //input[@name='container[item]'].
Tester\DomQuery::css2xpath('input[name=container[item]]')
//input[@name='container[item']
//input[@name='container[item]']
I think problem is in regex here: https://github.com/nette/tester/blob/master/src/Framework/DomQuery.php#L84 But I don't know correct code.
I'm not a CSS guru, imho the value should be quoted like input[name="container[item]"]. If so, bug is still valid :o)
input[name="container[item]"]
Proposed fix #236.
Thanks @milo, works well
Hi,
I try to use
Tester\DomQuery::css2xpath('input[name=container[item]]')
to test Nette\Forms, but css2xpath response://input[@name='container[item']
instead of//input[@name='container[item]']
.I think problem is in regex here: https://github.com/nette/tester/blob/master/src/Framework/DomQuery.php#L84 But I don't know correct code.