Esempio n. 1
0
 /**
  * Test get/set line style
  */
 public function testSetGetLineStyle()
 {
     $object = new Border();
     $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Style\\Border', $object->setLineStyle());
     $this->assertEquals(Border::LINE_SINGLE, $object->getLineStyle());
     $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Style\\Border', $object->setLineStyle(''));
     $this->assertEquals(Border::LINE_SINGLE, $object->getLineStyle());
     $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Style\\Border', $object->setLineStyle(BORDER::LINE_DOUBLE));
     $this->assertEquals(Border::LINE_DOUBLE, $object->getLineStyle());
 }
Esempio n. 2
0
 /**
  * Create a new \PhpOffice\PhpPresentation\Style\Borders
  */
 public function __construct()
 {
     // Initialise values
     $this->left = new Border();
     $this->right = new Border();
     $this->top = new Border();
     $this->bottom = new Border();
     $this->diagonalUp = new Border();
     $this->diagonalUp->setLineStyle(Border::LINE_NONE);
     $this->diagonalDown = new Border();
     $this->diagonalDown->setLineStyle(Border::LINE_NONE);
 }
 /**
  * Create a new self
  */
 public function __construct()
 {
     // Initialise values
     $this->container = null;
     $this->offsetX = 0;
     $this->offsetY = 0;
     $this->width = 0;
     $this->height = 0;
     $this->rotation = 0;
     $this->fill = new Style\Fill();
     $this->border = new Style\Border();
     $this->shadow = new Style\Shadow();
     $this->border->setLineStyle(Style\Border::LINE_NONE);
 }