Simplify: fix fallback bug, reduce redundancy, restore step PHPDocs

- FailureShowListener: fix show_tmp_dir fallback '' -> sys_get_temp_dir()
  (bug introduced by duplication with MinkContext::showLastResponse)
- SauceLabsFactory: simplify `is_bool($x) ? $x : (bool) $x` -> `(bool) $x`
- MinkExtension::load: extract $baseUrl/$browserName locals to avoid
  evaluating the same `?? ''` expression twice per line
- EnvironmentCapabilities: store TRAVIS_JOB_NUMBER and JENKINS_HOME
  getenv() results before the switch to avoid double calls per match
- MinkContext: restore PHPDoc comments on all step methods (Example lines
  for discoverability); keep PHP attributes, no @Given/@When/@Then tags

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Kamil Kokot
2026-06-12 17:50:42 +02:00
parent 47a9d45cd1
commit 2947994733
5 changed files with 210 additions and 7 deletions

View File

@@ -39,7 +39,7 @@ class SauceLabsFactory extends Selenium2Factory
public function buildDriver(array $config): Definition
{
$host = 'ondemand.saucelabs.com';
if (is_bool($config['connect']) ? $config['connect'] : (bool) $config['connect']) {
if ((bool) $config['connect']) {
$host = 'localhost:4445';
}