php - Submit an array of values with SimpleTest -


i'm trying submit simple form has array of fields:

<form> <input type='text' name='article[]' id='article1' /> <input type='text' name='article[]' id='article2' /> <input type='text' name='article[]' id='article3' />  

so, how set different fields using simpletest?

(p.s. i've seen question: simpletest php scriptable browser... how test submit form has [ ] in form name (basically in array format)? doesn't answer question).

i figured out 1 way of doing use setfieldbyid. change code to:

$form->setfieldbyid('article1', 'some article text 1');  $form->setfieldbyid('article2', 'some article text 2');  

and on. works assumes can generate unique ids each field -- not difficult.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -