Lines Matching +full:check +full:- +full:attr

12         $form->addTextInput('foo', 'label text')->val('this is text');
14 $html = $form->toHTML();
15 $pq = (new Document())->html($html);
17 $input = $pq->find('input[name=foo]');
18 $this->assertTrue($input->count() == 1);
19 $this->assertEquals('this is text', $input->attr('value'));
20 $this->assertEquals('text', $input->attr('type'));
22 $label = $pq->find('label');
23 $this->assertTrue($label->count() == 1);
24 $this->assertEquals('label text', $label->find('span')->text());
28 * check that posted values overwrite preset default
32 $INPUT->post->set('foo', 'a new text');
35 $form->addTextInput('foo', 'label text')->val('this is text');
37 $html = $form->toHTML();
38 $pq = (new Document())->html($html);
40 $input = $pq->find('input[name=foo]');
41 $this->assertTrue($input->count() == 1);
42 $this->assertEquals('a new text', $input->attr('value'));
47 $INPUT->post->set('foo', '');
50 $form->addTextInput('foo', 'label text')->val('this is text');
52 $html = $form->toHTML();
53 $pq = (new Document())->html($html);
55 $input = $pq->find('input[name=foo]');
56 $this->assertTrue($input->count() == 1);
57 $this->assertEquals('', $input->attr('value'));
63 $form->addPasswordInput('foo', 'label text')->val('this is text');
65 $html = $form->toHTML();
66 $pq = (new Document())->html($html);
68 $input = $pq->find('input[name=foo]');
69 $this->assertTrue($input->count() == 1);
70 $this->assertEquals('this is text', $input->attr('value'));
71 $this->assertEquals('password', $input->attr('type'));
73 $label = $pq->find('label');
74 $this->assertTrue($label->count() == 1);
75 $this->assertEquals('label text', $label->find('span')->text());