artisan('make:crud', ['name' => $this->modelName, '--no-interaction' => true]); $modelFactoryPath = database_path('factories/'.$this->modelName.'Factory.php'); $this->assertFileExists($modelFactoryPath); $modelFactoryContent = "define(Item::class, function (Faker \$faker) { return [ 'name' => \$faker->word, 'description' => \$faker->sentence, ]; }); "; $this->assertEquals($modelFactoryContent, file_get_contents($modelFactoryPath)); } }