/** * Create new instance */ public function testConstruct() { $types = array('comboBox', 'dropDownList', 'date'); $type = $types[rand(0, 2)]; $value = rand(0, 100); $object = new SDT($type); $object->setValue($value); $object->setListItems($types); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\SDT', $object); $this->assertEquals($type, $object->getType()); $this->assertEquals($types, $object->getListItems()); $this->assertEquals($value, $object->getValue()); }