Exemple #1
0
 function let(TextSizeCalculatorInterface $calculator)
 {
     $calculator->calculateWidth(Argument::any())->willReturn(20);
     $this->beConstructedWith($calculator);
 }
Exemple #2
0
 /**
  * @param $text
  *
  * @return float
  */
 private function stringWidth($text)
 {
     return $this->textSizeCalculator->calculateWidth($text);
 }