1 | <?php |
||
9 | class DebugContext extends BaseContext |
||
10 | { |
||
11 | /** |
||
12 | * @var string |
||
13 | */ |
||
14 | private $screenshotDir; |
||
15 | |||
16 | public function __construct($screenshotDir = '.') |
||
20 | |||
21 | /** |
||
22 | * Pauses the scenario until the user presses a key. Useful when debugging a scenario. |
||
23 | * |
||
24 | * @Then (I )put a breakpoint |
||
25 | */ |
||
26 | public function iPutABreakpoint() |
||
35 | |||
36 | /** |
||
37 | * Saving a screenshot |
||
38 | * |
||
39 | * @When I save a screenshot in :filename |
||
40 | */ |
||
41 | public function iSaveAScreenshotIn($filename) |
||
46 | |||
47 | /** |
||
48 | * @AfterStep |
||
49 | */ |
||
50 | public function failScreenshots(AfterStepScope $scope) |
||
69 | |||
70 | /** |
||
71 | * @param AfterStepScope $scope |
||
72 | * @return \Behat\Gherkin\Node\ScenarioInterface |
||
73 | */ |
||
74 | private function getScenario(AfterStepScope $scope) |
||
91 | |||
92 | /** |
||
93 | * @param AfterStepScope $scope |
||
94 | * @return \Behat\Gherkin\Node\BackgroundNode|bool |
||
95 | */ |
||
96 | private function getBackground(AfterStepScope $scope) |
||
114 | |||
115 | public function saveScreenshot($filename = null, $filepath = null) |
||
123 | } |
||
124 |
This check looks for
while
loops that have no statements or where all statements have been commented out. This may be the result of changes for debugging or the code may simply be obsolete.Consider removing the loop.