1 | <?php |
||
15 | class ScreenshotTaker |
||
16 | { |
||
17 | /** @var Mink $mink */ |
||
18 | private $mink; |
||
19 | |||
20 | /** @var OutputInterface $output */ |
||
21 | private $output; |
||
22 | |||
23 | /** |
||
24 | * @var array $screenshots |
||
25 | */ |
||
26 | private $screenshots; |
||
27 | |||
28 | /** |
||
29 | * @var Config $config |
||
30 | */ |
||
31 | private $config; |
||
32 | |||
33 | /** |
||
34 | * @param Mink $mink |
||
35 | * @param OutputInterface $output |
||
36 | * @param Config $config |
||
37 | */ |
||
38 | public function __construct(Mink $mink, OutputInterface $output, Config $config) |
||
45 | |||
46 | /** |
||
47 | * Save the screenshot into a local buffer |
||
48 | */ |
||
49 | public function takeScreenshot() |
||
57 | |||
58 | /** |
||
59 | * @return boolean |
||
60 | */ |
||
61 | public function hasScreenshot() |
||
65 | |||
66 | /** |
||
67 | * @return string |
||
68 | */ |
||
69 | public function getImage() |
||
73 | |||
74 | /** |
||
75 | * @return string |
||
76 | */ |
||
77 | private function getCombinedImage() |
||
94 | |||
95 | /** |
||
96 | * @return string |
||
97 | */ |
||
98 | private function getLastImage() |
||
102 | |||
103 | /** |
||
104 | * Remove previous images |
||
105 | */ |
||
106 | public function reset() |
||
110 | } |
||
111 |