xqus
1 month ago
273
2
Testing

Default User factory gives InvalidArgumentException: Unknown formatter "name"

Posted 1 month ago by xqus

Hi,

When running php artisan test the default User factory returns

InvalidArgumentException
Unknown formatter "name"

Using the same factory in for example web.php works fine, it only breaks when it is used in a test.

I have tested in a clean Laravel 8 install, only added $user = User::factory()->create(); to tests\Unit\ExampleTest.php

What am I missing?

Please sign in or create an account to participate in this conversation.