Skip to content

assertSeeLiveWire - method not found #2129

Answered by calebdw
finn-matti asked this question in Q&A
Discussion options

You must be logged in to vote

The test macros are registered when the Livewire service provider is booted---however, the SupportTesting component hook early returns when the environment is not testing:

https://github.com/livewire/livewire/blob/047904314adc8a27046d042959a4c29c0feea6e2/src/Features/SupportTesting/SupportTesting.php#L12-L14

You likely are not running PHPStan in the testing environment so the custom macros are not being registered. Updating my .env to be testing allowed phpstan to discover the method

Replies: 1 comment 10 replies

Comment options

You must be logged in to vote
10 replies
@finn-matti
Comment options

@calebdw
Comment options

@finn-matti
Comment options

@calebdw
Comment options

Answer selected by finn-matti
@finn-matti
Comment options

@calebdw
Comment options

@finn-matti
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants