예제 #1
0
 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));
     }
 }
예제 #2
0
 public function testCanSetAlwaysWrap()
 {
     $element = new Element('foo');
     $element->setLabelOption('always_wrap', true);
     $this->assertTrue($element->getLabelOption('always_wrap'));
 }
예제 #3
0
 public function testLabelOptionAlwaysWrapDefaultsToFalse()
 {
     $element = new Element('foo');
     $this->assertEmpty($element->getLabelOption('always_wrap'));
 }