/** * Tests setting values. */ public function testSet() { $option = new Option(); // set name $option->setName('hero'); $this->assertEquals('hero', $option->getName()); $option->setName(''); $this->assertEquals('', $option->getName()); $option->setName('-123'); $this->assertEquals('-123', $option->getName()); // set type $option->setType('string'); $this->assertEquals('string', $option->getType()); $option->setType('boolean'); $this->assertEquals('boolean', $option->getType()); $option->setType('select'); $this->assertEquals('select', $option->getType()); // set value $option->setValue(123); $this->assertEquals(123, $option->getValue()); $option->setValue(true); $this->assertTrue($option->getValue()); $option->setValue(''); $this->assertEquals('', $option->getValue()); }