public function testCanAddRequiredTextToPlainFields() { $this->former->close(); $this->former->withRules(array('foo' => 'required')); $input = $this->former->text('foo')->__toString(); $label = $this->matchLabel('Foo', 'foo', true); unset($label['attributes']['class']); $this->assertHTML($this->matchField(array('required' => 'true')), $input); $this->assertHTML($label, $input); }