/** * @covers Dropdown_Optgroup::getOptions */ public function testgetOptions() { $name = "napa"; $value = "valley"; $dropDown = $this->object->addOption($name, $value); $actual = $dropDown->getOptions(); $excepted = new \Dropdown_Option($name, $value); $this->assertContainsOnlyInstancesOf("Dropdown_Option", $actual); $this->assertEquals($excepted, $actual[0]); }
/** * @param Dropdown_Optgroup $optgroup * @return Dropdown */ public function addOptgroupObject($optgroup) { $optgroup->setForm($this->getForm()); $this->optgroups[] = $optgroup; return $this; }