Ejemplo n.º 1
0
 public function testGetSetInset()
 {
     $object = new RichText();
     // Default
     $this->assertInstanceOf('PhpOffice\\PhpPowerpoint\\Shape\\RichText', $object->setInsetBottom());
     $this->assertEquals(4.8, $object->getInsetBottom());
     $this->assertInstanceOf('PhpOffice\\PhpPowerpoint\\Shape\\RichText', $object->setInsetLeft());
     $this->assertEquals(9.6, $object->getInsetLeft());
     $this->assertInstanceOf('PhpOffice\\PhpPowerpoint\\Shape\\RichText', $object->setInsetRight());
     $this->assertEquals(9.6, $object->getInsetRight());
     $this->assertInstanceOf('PhpOffice\\PhpPowerpoint\\Shape\\RichText', $object->setInsetTop());
     $this->assertEquals(4.8, $object->getInsetTop());
     // Value
     $value = rand(1, 100);
     $this->assertInstanceOf('PhpOffice\\PhpPowerpoint\\Shape\\RichText', $object->setInsetBottom($value));
     $this->assertEquals($value, $object->getInsetBottom());
     $this->assertInstanceOf('PhpOffice\\PhpPowerpoint\\Shape\\RichText', $object->setInsetLeft($value));
     $this->assertEquals($value, $object->getInsetLeft());
     $this->assertInstanceOf('PhpOffice\\PhpPowerpoint\\Shape\\RichText', $object->setInsetRight($value));
     $this->assertEquals($value, $object->getInsetRight());
     $this->assertInstanceOf('PhpOffice\\PhpPowerpoint\\Shape\\RichText', $object->setInsetTop($value));
     $this->assertEquals($value, $object->getInsetTop());
 }