public function testSettingLabelOptionsMerges() { $element = new Element(); $options = array('foo' => 'bar', 'foo2' => 'baz'); $optionsExtra = array('foo3' => 'bar2', 'foo2' => 'baz2'); $element->setLabelOptions($options); $element->setLabelOptions($optionsExtra); $expected = array_merge($options, $optionsExtra); // check each expected key individually foreach ($expected as $k => $v) { $this->assertEquals($v, $element->getLabelOption($k)); } }
public function testCanSetAlwaysWrap() { $element = new Element('foo'); $element->setLabelOption('always_wrap', true); $this->assertTrue($element->getLabelOption('always_wrap')); }
public function testLabelOptionAlwaysWrapDefaultsToFalse() { $element = new Element('foo'); $this->assertEmpty($element->getLabelOption('always_wrap')); }