assertEquals(Placeholder::PH_TYPE_BODY, $object->getType()); $this->assertNull($object->getIdx()); } public function testIdx() { $value = rand(0, 100); $object = new Placeholder(Placeholder::PH_TYPE_BODY); $this->assertNull($object->getIdx()); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Shape\\Placeholder', $object->setIdx($value)); $this->assertEquals($value, $object->getIdx()); } public function testType() { $rcPlaceholder = new \ReflectionClass('PhpOffice\PhpPresentation\Shape\Placeholder'); $arrayConstants = $rcPlaceholder->getConstants(); $value = array_rand($arrayConstants); $object = new Placeholder(Placeholder::PH_TYPE_BODY); $this->assertEquals(Placeholder::PH_TYPE_BODY, $object->getType()); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Shape\\Placeholder', $object->setType($value)); $this->assertEquals($value, $object->getType()); } }