public function test_image_submit_tag() { $actual = FormTagHelper::image_submit_tag('submit.gif'); $matcher = array('tag' => 'input', 'attributes' => array('type' => 'image', 'name' => null, 'src' => 'submit.gif')); $this->assertTag($matcher, $actual, 'Default attributes'); $this->assertNotContains('id=', $actual, 'No id attribute by default'); $actual = FormTagHelper::image_submit_tag('submit.gif', array('name' => 'foo')); $this->assertRegexp('/name="foo"/', $actual, "Additional attributes"); }