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
I made the models strict in my AppServiceProvider, when I try to access a missing attribute, a MissingAttributeException is thrown, but on a unit test, it's not (I am using Pest btw).
I also made the models strict on the testing function but the exception is still not thrown.
Steps To Reproduce
The text was updated successfully, but these errors were encountered:
We'll need more info and/or code to debug this further. Can you please create a repository with the command below, commit the code that reproduces the issue as one separate commit on the main/master branch and share the repository here?
@hbakouane, This likely happens because your PHPUnit tests aren't using the same configuration settings as your production or development environments.
In phpUnit
protected function setUp(): void
{
parent::setUp();
Model::shouldBeStrict();
}
Laravel Version
11
PHP Version
8.2
Database Driver & Version
sqlite
Description
I made the models strict in my AppServiceProvider, when I try to access a missing attribute, a MissingAttributeException is thrown, but on a unit test, it's not (I am using Pest btw).
I also made the models strict on the testing function but the exception is still not thrown.
Steps To Reproduce
The text was updated successfully, but these errors were encountered: