Exemplo n.º 1
0
 /**
  * Tests the following case:
  *
  * An optgroup identifier has been given.
  * One entry has a valid value.
  * A second entry has a null value.
  * No optgroup_default has been configured.
  *
  * Entry one should be grouped, entry two shouldn't be.
  */
 public function testEmptyOptgroupValueBelongsToNoOptgroupIfNotConfigured()
 {
     $this->prepareProxyWithOptgroupPresetThatHasPartiallyEmptyOptgroupValues();
     $this->proxy->setOptions(array('optgroup_identifier' => 'optgroup'));
     $valueOptions = $this->proxy->getValueOptions();
     $expectedOutput = ['Group One' => ['label' => 'Group One', 'options' => [0 => ['label' => 'object one username', 'value' => 1, 'attributes' => []]]], 0 => ['label' => 'object two username', 'value' => 2, 'attributes' => []]];
     $this->assertEquals($expectedOutput, $valueOptions);
 }
Exemplo n.º 2
0
 public function testUsingFindMethod()
 {
     $this->prepareFilteredProxy();
     $this->proxy->getValueOptions();
 }