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

InternalMethod error conflicts with PropertyNotSetInConstructor #11132

Open
antonioribeiro opened this issue Oct 20, 2024 · 0 comments
Open

InternalMethod error conflicts with PropertyNotSetInConstructor #11132

antonioribeiro opened this issue Oct 20, 2024 · 0 comments

Comments

@antonioribeiro
Copy link

antonioribeiro commented Oct 20, 2024

If a property is defined on a class that extends PHPUnit\Framework\TestCase I get first a PropertyNotSetInConstructor error, and then when I create a constructor to set it, I get a The method PHPUnit\Framework\TestCase::__construct is internal to PHPUnit. So we have two ways here:

  • Ignore it if the constructor is internal
  • Check if the the variable is defined on
public function setUp(): void
{
    $this->google2fa = new Google2FA();
}
@antonioribeiro antonioribeiro changed the title InternalMethod conflicts with InternalMethod conflicts with PropertyNotSetInConstructor Oct 20, 2024
@antonioribeiro antonioribeiro changed the title InternalMethod conflicts with PropertyNotSetInConstructor InternalMethod error conflicts with PropertyNotSetInConstructor Oct 20, 2024
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