コード例 #1
0
 public function testSelectCanSetSelectedWithGetValueOnMissingValue()
 {
     Form::clear();
     $actual = (string) Form::select('test')->getValue('AR')->data(['TX' => 'Texas', 'AR' => 'Arkansas', 'OK' => 'Oklahoma']);
     $expected = '<select name="test" id="test"><option value="TX">Texas</option><option selected="selected" value="AR">Arkansas</option><option value="OK">Oklahoma</option></select>';
     $this->assertEquals($expected, $actual);
 }