Exemple #1
0
 /**
  * @test
  */
 public function wordSpacingHasAnImpactOnWidth()
 {
     $words = 'some more words';
     $width = 100;
     $linePart = new LinePart($words, $width, 0, new Text());
     $wordSpacing = 5;
     $linePart->setWordSpacing($wordSpacing);
     $expectedWidth = $width + ($linePart->getNumberOfWords() - 1) * $wordSpacing;
     $this->assertEquals($expectedWidth, $linePart->getWidth());
 }
Exemple #2
0
 public function addPart(LinePart $linePart)
 {
     $linePart->setLine($this);
     $this->parts[] = $linePart;
 }