/**
  * Diagnose the screen
  *
  * @return $this
  */
 protected function diagnoseScreen()
 {
     $screen = $this->handheld->getScreen();
     echo 'Running diagnostic on screen' . PHP_EOL;
     echo 'Screen width: ' . $screen->getWidth() . PHP_EOL;
     echo 'Screen height: ' . $screen->getHeight() . PHP_EOL;
     return $this;
 }
 /**
  * @dataProvider initHandholdDiagnostic
  */
 public function testHandheldDiagnose(AbstractAppleHandheld $device, Visitor\HandheldDiagnostic $visitor)
 {
     $screen = $device->getScreen();
     $device->accept($visitor);
     $visitor->diagnose();
     $this->expectOutputRegex('@Screen width: ' . $screen->getWidth() . '@');
     $this->expectOutputRegex('@Screen height: ' . $screen->getHeight() . '@');
     $this->expectOutputRegex('@Capacity: ' . $device->getCapacity() . 'gb@');
 }
 /**
  * @param AbstractAppleHandheld $device
  */
 public function __construct(AbstractAppleHandheld $device)
 {
     parent::__construct($device->getScreen(), $device->getColour(), $device->getCapacity(), static::DEFAULT_PRICE);
     $this->device = $device;
 }