laracasts / TestDummy

Easy factories for PHP integration testing.
https://laracasts.com/lessons/whats-new-in-testdummy
MIT License
457 stars 80 forks source link

Exception: The {name} model was not found #71

Closed asvae closed 9 years ago

asvae commented 9 years ago

I use artisan tinker as follows:

use Laracasts\TestDummy\Factory;
$factory = new Factory();
$factory->build('Comment');

As a result, I get TestDummyException with message 'The Comment model was not found.' I checked $factory->factories() and it clearly says that factory with name: 'Comment' is included. Issue happened for any other factory I used.

AlanRezende commented 9 years ago

Try to use

$factory->build('App\Comment');