Example #1
0
 public function testGetText()
 {
     // Arrange
     // ...
     // Act
     $value = $this->part->getText();
     // Assert
     $this->assertEquals('text', $value);
 }
Example #2
0
 private function calculateWidth(Part $part)
 {
     $textWidth = $this->widthCalculator->getWidth($part->getText(), $part->getFont()) + 10;
     if (!$part->getWidth()) {
         $width = $textWidth;
     } else {
         $width = $part->getWidth();
     }
     return $width;
 }