Browse Source

Fix new phpstan errors

pull/9859/head
Aleksander Machniak 3 months ago
parent
commit
9a7aa231aa
  1. 10
      tests/Browser/TestCase.php

10
tests/Browser/TestCase.php

@ -122,10 +122,7 @@ abstract class TestCase extends PHPUnitTestCase
}
// Purge screenshots from the last test run
$pattern = sprintf('failure-%s_%s-*',
str_replace('\\', '_', static::class),
method_exists($this, 'getName') ? $this->getName(false) : $this->name()
);
$pattern = sprintf('failure-%s_%s-*', str_replace('\\', '_', static::class), $this->name()); // @phpstan-ignore-line
try {
$files = Finder::create()->files()->in(Browser::$storeScreenshotsAt)->name($pattern);
@ -137,10 +134,7 @@ abstract class TestCase extends PHPUnitTestCase
}
// Purge console logs from the last test run
$pattern = sprintf('%s_%s-*',
str_replace('\\', '_', static::class),
method_exists($this, 'getName') ? $this->getName(false) : $this->name()
);
$pattern = sprintf('%s_%s-*', str_replace('\\', '_', static::class), $this->name()); // @phpstan-ignore-line
try {
$files = Finder::create()->files()->in(Browser::$storeConsoleLogAt)->name($pattern);

Loading…
Cancel
Save