Esempio n. 1
0
 /**
  * Test get/set name
  */
 public function testSetGetName()
 {
     $object = new Font();
     $this->assertInstanceOf('PhpOffice\\PhpPowerpoint\\Style\\Font', $object->setName());
     $this->assertEquals('Calibri', $object->getName());
     $this->assertInstanceOf('PhpOffice\\PhpPowerpoint\\Style\\Font', $object->setName(''));
     $this->assertEquals('Calibri', $object->getName());
     $this->assertInstanceOf('PhpOffice\\PhpPowerpoint\\Style\\Font', $object->setName('Arial'));
     $this->assertEquals('Arial', $object->getName());
 }
Esempio n. 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);
 }
Esempio n. 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;
 }