Skip to content

Commit 7af7cb7

Browse files
committed
fixes to WebDriver tests
1 parent 7b5c1be commit 7af7cb7

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

src/Codeception/Module/WebDriver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ public function _after(TestInterface $test)
270270
public function _failed(TestInterface $test, $fail)
271271
{
272272
$this->debugWebDriverLogs();
273-
$filename = str_replace(['::', '\\', '/'], ['.', '', ''], Descriptor::getTestSignature($test)) . '.fail';
273+
$filename = str_replace([':', '\\', '/'], ['.', '', ''], Descriptor::getTestSignature($test)) . '.fail';
274274
$this->_saveScreenshot(codecept_output_dir() . $filename . '.png');
275275
$this->_savePageSource(codecept_output_dir() . $filename . '.html');
276276
$this->debug("Screenshot and page source were saved into '_output' dir");

tests/web/WebDriverTest.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -442,9 +442,7 @@ public function testCreateCestScreenshotOnFail()
442442
]),
443443
]);
444444
$this->module->webDriver = $fakeWd;
445-
$cest = (new \Codeception\Test\Cest())
446-
->config('testClassInstance', new stdClass())
447-
->config('testMethod','login');
445+
$cest = new \Codeception\Test\Cest(new stdClass(), 'login', 'someCest.php');
448446
$this->module->_failed($cest, new PHPUnit_Framework_AssertionFailedError());
449447
}
450448

0 commit comments

Comments
 (0)