mirror of
https://github.com/pestphp/pest.git
synced 2026-03-10 01:37:21 +01:00
feat: toHaveAllMethodsDocumented and toHaveAllPropertiesDocumented
This commit is contained in:
@ -14,15 +14,21 @@ use Symfony\Component\Process\Process;
|
||||
final class GitDirtyTestCaseFilter implements TestCaseFilter
|
||||
{
|
||||
/**
|
||||
* @var string[]|null
|
||||
* @var array<int, string>|null
|
||||
*/
|
||||
private ?array $changedFiles = null;
|
||||
|
||||
/**
|
||||
* Creates a new instance of the filter.
|
||||
*/
|
||||
public function __construct(private readonly string $projectRoot)
|
||||
{
|
||||
// ...
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function accept(string $testCaseFilename): bool
|
||||
{
|
||||
if ($this->changedFiles === null) {
|
||||
@ -41,6 +47,9 @@ final class GitDirtyTestCaseFilter implements TestCaseFilter
|
||||
return in_array($relativePath, $this->changedFiles, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads the changed files.
|
||||
*/
|
||||
private function loadChangedFiles(): void
|
||||
{
|
||||
$process = new Process(['git', 'status', '--short', '--', '*.php']);
|
||||
|
||||
Reference in New Issue
Block a user