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) |
||
44 | |||
45 | /** |
||
46 | * Save the screenshot into a local buffer |
||
47 | */ |
||
48 | public function takeScreenshot() |
||
56 | |||
57 | /** |
||
58 | * @return string |
||
59 | */ |
||
60 | public function getImage() |
||
64 | |||
65 | /** |
||
66 | * @return string |
||
67 | */ |
||
68 | private function getCombinedImage() |
||
85 | |||
86 | /** |
||
87 | * @return string |
||
88 | */ |
||
89 | private function getLastImage() |
||
93 | |||
94 | /** |
||
95 | * Remove previous images |
||
96 | */ |
||
97 | public function reset() |
||
101 | } |
||
102 |