Skip to content

Commit b66a59b

Browse files
authored
Merge pull request #6303 from Codeception/editor_url
Rename editorUrl setting to editor_url
2 parents c873087 + 15f71ae commit b66a59b

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/Codeception/Subscriber/Console.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -357,16 +357,16 @@ public function printFail(FailEvent $e)
357357
$this->writeCurrentTest($failedTest, false);
358358
$this->output->writeln('');
359359

360-
// Clickable `editorUrl`:
361-
if (isset($this->options['editorUrl']) && is_string($this->options['editorUrl'])) {
360+
// Clickable `editor_url`:
361+
if (isset($this->options['editor_url']) && is_string($this->options['editor_url'])) {
362362
$filePath = codecept_absolute_path(Descriptor::getTestFileName($failedTest));
363363
$line = 1;
364364
foreach ($fail->getTrace() as $trace) {
365365
if (isset($trace['file']) && $filePath === $trace['file'] && isset($trace['line'])) {
366366
$line = $trace['line'];
367367
}
368368
}
369-
$message = str_replace(['%%file%%', '%%line%%'], [$filePath, $line], $this->options['editorUrl']);
369+
$message = str_replace(['%%file%%', '%%line%%'], [$filePath, $line], $this->options['editor_url']);
370370
} else {
371371
$message = codecept_relative_path(Descriptor::getTestFullName($failedTest));
372372
}
@@ -507,9 +507,9 @@ public function printExceptionTrace($e)
507507
continue;
508508
}
509509

510-
// Clickable `editorUrl`:
511-
if (isset($this->options['editorUrl']) && is_string($this->options['editorUrl'])) {
512-
$lineString = str_replace(['%%file%%', '%%line%%'], [$step['file'], $step['line']], $this->options['editorUrl']);
510+
// Clickable `editor_url`:
511+
if (isset($this->options['editor_url']) && is_string($this->options['editor_url'])) {
512+
$lineString = str_replace(['%%file%%', '%%line%%'], [$step['file'], $step['line']], $this->options['editor_url']);
513513
} else {
514514
$lineString = $step['file'] . ':' . $step['line'];
515515
}
@@ -560,9 +560,9 @@ public function printScenarioTrace(ScenarioDriven $failedTest)
560560
if (!$step instanceof Comment) {
561561
$filePath = $step->getFilePath();
562562
if ($filePath) {
563-
// Clickable `editorUrl`:
564-
if (isset($this->options['editorUrl']) && is_string($this->options['editorUrl'])) {
565-
$lineString = str_replace(['%%file%%', '%%line%%'], [codecept_absolute_path($step->getFilePath()), $step->getLineNumber()], $this->options['editorUrl']);
563+
// Clickable `editor_url`:
564+
if (isset($this->options['editor_url']) && is_string($this->options['editor_url'])) {
565+
$lineString = str_replace(['%%file%%', '%%line%%'], [codecept_absolute_path($step->getFilePath()), $step->getLineNumber()], $this->options['editor_url']);
566566
} else {
567567
$lineString = $step->getFilePath() . ':' . $step->getLineNumber();
568568
}

0 commit comments

Comments
 (0)