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

PhpUnit 10: Cannot override final method PHPUnit\Framework\Assert::assertThat() #708

Open
michapietsch-streamline opened this issue Jul 2, 2024 · 1 comment

Comments

@michapietsch-streamline
Copy link

With the latest version of Clockwork and PhpUnit 10, when I try to collect data from a test, I get:

Fatal error: Cannot override final method PHPUnit\Framework\Assert::assertThat() in vendor/itsgoingd/clockwork/Clockwork/Support/Laravel/Tests/UsesClockwork.php on line 71

As a quick and dirty fix I removed the final.

I'm now at:

Error: Call to undefined method Tests\Feature\SomeTest::getStatus()
/Users/Shared/Cloud/Repos/SaaS/saas/api/vendor/itsgoingd/clockwork/Clockwork/Support/Laravel/Tests/UsesClockwork.php:40

I pull in the trait into my Laravel feature tests, and I included the extension in phpunit.xml.

What am I possibly missing?

Thanks in advance for your help!

@itsgoingd
Copy link
Owner

Hey, for PHPUnit 10, you should only add the extension to phpunit.xml as described here - https://underground.works/clockwork/#docs-collected-data

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

2 participants