Пример #1
0
 public function testSelectEscape()
 {
     $options = new FormOptions();
     $options->add('foo & "bar"', '<spam> & <ham>');
     $field = new FormSelect('key', 'id', 'name', '7', 'label', ['options' => $options]);
     $this->assertEquals("<select name=\"name\" id=\"id\">\n<option value=\"foo &amp; &quot;bar&quot;\">&lt;spam&gt; &amp; &lt;ham&gt;</option>\n</select>", $field->getContent());
 }