Beispiel #1
0
 /**
  * Test get/set size
  */
 public function testSetGetSize()
 {
     $object = new Font();
     $this->assertInstanceOf('PhpOffice\\PhpPowerpoint\\Style\\Font', $object->setSize());
     $this->assertEquals(10, $object->getSize());
     $this->assertInstanceOf('PhpOffice\\PhpPowerpoint\\Style\\Font', $object->setSize(''));
     $this->assertEquals(10, $object->getSize());
     $value = rand(1, 100);
     $this->assertInstanceOf('PhpOffice\\PhpPowerpoint\\Style\\Font', $object->setSize($value));
     $this->assertEquals($value, $object->getSize());
 }
Beispiel #2
0
 /**
  * Create a new \PhpOffice\PhpPowerpoint\Shape\Chart\Title instance
  */
 public function __construct()
 {
     $this->alignment = new Alignment();
     $this->font = new Font();
     $this->font->setName('Calibri');
     $this->font->setSize(18);
 }
Beispiel #3
0
 /**
  * Create a new \PhpOffice\PhpPowerpoint\Shape\Chart\Series instance
  *
  * @param string $title  Title
  * @param array  $values Values
  */
 public function __construct($title = 'Series Title', $values = array())
 {
     $this->fill = new Fill();
     $this->font = new Font();
     $this->font->setName('Calibri');
     $this->font->setSize(9);
     $this->title = $title;
     $this->values = $values;
 }