Skip to content
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

[BUG] Error when trying to instantiate MockedClientImpl #51

Open
nospoon opened this issue May 20, 2021 · 0 comments
Open

[BUG] Error when trying to instantiate MockedClientImpl #51

nospoon opened this issue May 20, 2021 · 0 comments

Comments

@nospoon
Copy link

nospoon commented May 20, 2021

When trying to write a test using the MockedClientImpl, when I try to pass an instance of MockedClientImpl into my mocked class under test, I get an error:
ErrorException : The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence
The exception is being thrown on line 127 of PAGI/Client/Impl/MockedClientImpl.php, which would indicate it's trying to make a call assertion, but it is only being instantiated, no assertions were specified.

Here's my test code for reference

$agiClient = new MockedClientImpl();
$callLog = new Call();
$mockHandler = Mockery::mock(CallHandler::class, [$agiClient, $callLog])->makePartial();
$mockHandler->shouldAllowMockingProtectedMethods();
@nospoon nospoon changed the title [BUG] Error when trying to instantiate MockerClientImpl [BUG] Error when trying to instantiate MockedClientImpl May 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant