You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Up to this change, this trait was not depending on any properties of the class that it's used in. This allowed for easy injection of Faker into other elements of code.
Steps To Reproduce:
Add the Illuminate\Foundation\Testing\WithFaker trait to any class that's not a Illuminate\Foundation\Testing\TestCase or object with $app property, it results with an error that the property is undefined.
The text was updated successfully, but these errors were encountered:
My team is having this issue too.
Our use case is that some of our TestCases include a non TestCase object that has the WithFaker trait and generates our test data. #31083 resolves the issue. Thank you.
Description:
Recent change to
src/Illuminate/Foundation/Testing/WithFaker.php
added resolving of Faker instance from the container.Up to this change, this trait was not depending on any properties of the class that it's used in. This allowed for easy injection of Faker into other elements of code.
Steps To Reproduce:
Add the
Illuminate\Foundation\Testing\WithFaker
trait to any class that's not aIlluminate\Foundation\Testing\TestCase
or object with $app property, it results with an error that the property is undefined.The text was updated successfully, but these errors were encountered: