DrawMyAttention\ResourceGenerator\Commands\ResourceGeneratorTest::it_creates_a_model_factory PHP Method

it_creates_a_model_factory() public method

    public function it_creates_a_model_factory()
    {
        // Given there is a model called 'Elephant'
        $model = 'Elephant';
        // When I create a resource for Elephant.
        $this->runArtisanCommand(ResourceMakeCommand::class, ['name' => $model, 'attributes' => 'name:string,100,fillable|age:integer,unsigned,index,hidden|colour:string,nullable,hidden|nickname']);
        // Then a model factory is created for Elephant.
        $this->seeInFile(file_get_contents(base_path('tests/stubs/factory.stub')), database_path('factories/ModelFactory.php'));
        $this->clearGeneratedFiles($model);
    }