/** * @covers Xoops\Form\Element::setIfNotEmpty */ public function test_setIfNotEmpty() { $name = 'name'; $value = 'test'; $this->assertFalse($this->object->has($name)); $this->object->setIfNotEmpty($name, ''); $this->assertFalse($this->object->has($name)); $this->object->setIfNotEmpty($name, $value); $actual = $this->object->get($name); $this->assertSame($value, $actual); $this->object->setIfNotEmpty($name, 'this_will_not_be_set'); $actual = $this->object->get($name); $this->assertSame($value, $actual); }