Skip to content

Commit

Permalink
disable CheckDirectDependencyUse
Browse files Browse the repository at this point in the history
  • Loading branch information
diosmosis committed Jun 12, 2024
1 parent 0838c66 commit 29384a3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions resources/core-scoper.inc.php
Original file line number Diff line number Diff line change
@@ -216,6 +216,15 @@ static function (string $filePath, string $prefix, string $content) use ($isRena
$content = str_replace('it(', 'it.skip(', $content);
}

if ($filePath === __DIR__ . '/plugins/TestRunner/Commands/CheckDirectDependencyUse.php') {
$replacementCode = <<<PHP
\\PHPUnit\\Framework\\Assert::markTestSkipped("do not run");
return 0;
PHP;

$content = preg_replace('/protected\s+function\s+doExecute\(\)\s+:\s+int\s+\{/', '$0' . $replacementCode, $content);
}

return $content;
},
],

0 comments on commit 29384a3

Please sign in to comment.