Skip to content

feat: PHPUnit 10.4 support #63

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Oct 30, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
suppress phpcs failures
  • Loading branch information
marcoscoelho committed Oct 27, 2023
commit 617f0439486b3c447871a66e232a396de281ec3c
4 changes: 3 additions & 1 deletion classes/PHPMock.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ trait PHPMock
public static $templatesPath = '/tmp';

private $openInvocation = 'new \PHPUnit\Framework\MockObject\Invocation(';
private $openWrapper = '\phpmock\phpunit\DefaultArgumentRemoverReturnTypes100::removeDefaultArgumentsWithReflection(';
private $openWrapper = '\phpmock\phpunit\DefaultArgumentRemoverReturnTypes100::removeDefaultArgumentsWithReflection('; // phpcs:ignore
private $closeFunc = ')';

/**
Expand Down Expand Up @@ -257,6 +257,7 @@ private function createCustomTemplateFile(string $templateFile, string $customTe
{
$template = file_get_contents($templateFile);

// phpcs:disable
if (
($start = strpos($template, $this->openInvocation)) !== false &&
($end = strpos($template, $this->closeFunc, $start)) !== false
Expand All @@ -269,5 +270,6 @@ private function createCustomTemplateFile(string $templateFile, string $customTe
fclose($file);
}
}
// phpcs:enable
}
}