Skip to content

MissingAttributeException is not thrown on unit tests #54339

@hbakouane

Description

@hbakouane

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

Image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions