hasImage() public method

Test to see if a form has an image control.
public hasImage ( SelectorInterface $selector ) : boolean
$selector SelectorInterface Criteria to apply.
return boolean True if present.
 function testImageSubmitButton()
 {
     $form = new SimpleForm(new SimpleFormTag(array()), new SimpleUrl('htp://host'));
     $form->addWidget(new SimpleImageSubmitTag(array('type' => 'image', 'src' => 'source.jpg', 'name' => 'go', 'alt' => 'Go!', 'id' => '9')));
     $this->assertTrue($form->hasImage(new SimpleByLabel('Go!')));
     $this->assertEqual($form->submitImage(new SimpleByLabel('Go!'), 100, 101), new SimpleGetEncoding(array('go.x' => 100, 'go.y' => 101)));
     $this->assertTrue($form->hasImage(new SimpleByName('go')));
     $this->assertEqual($form->submitImage(new SimpleByName('go'), 100, 101), new SimpleGetEncoding(array('go.x' => 100, 'go.y' => 101)));
     $this->assertTrue($form->hasImage(new SimpleById(9)));
     $this->assertEqual($form->submitImage(new SimpleById(9), 100, 101), new SimpleGetEncoding(array('go.x' => 100, 'go.y' => 101)));
 }