PHP Class DrawMyAttention\ResourceGenerator\Commands\ResourceGeneratorTest

Inheritance: extends Orchestra\Testbench\TestCase
Datei anzeigen Open project: drawmyattention/laravel-make-resource

Public Methods

Method Description
it_accepts_attributes_which_are_saved_to_the_model ( )
it_adds_all_of_the_attributes_that_were_provided_as_columns_in_the_migration ( )
it_adds_attributes_that_are_tagged_as_fillable_to_the_fillable_attributes_array ( )
it_adds_attributes_that_are_tagged_as_hidden_to_the_hidden_attributes_array ( )
it_adds_routes_to_the_existing_routes_file ( )
it_builds_table_columns_based_on_attributes ( )
it_converts_a_php_array_to_a_string_representation_that_can_be_used_to_inject_to_a_template ( )
it_creates_a_migration_based_on_the_generated_model ( )
it_creates_a_model_factory ( )
it_creates_a_model_that_can_be_instantiated ( )
it_creates_a_model_with_the_correct_class_name ( )
it_creates_a_new_controller_for_the_model ( )
it_creates_the_correct_table_in_the_migration ( )
it_does_not_overwrite_an_existing_model ( )
it_generates_a_new_model ( )
it_names_the_migration_correctly ( )
it_splits_a_pipe_separated_list_of_attributes_to_an_array_of_attributes ( )
removeCreatedFile ( $filename )
removeWhiteSpace ( $text )
runArtisanCommand ( $class, array $parameters = [] ) : Symfony\Component\Console\Tester\CommandTester
seeFileWasCreated ( $filename )
seeInConsoleOutput ( $text, $console )
seeInFile ( $text, $file )

Protected Methods

Method Description
getPackageProviders ( Illuminate\Foundation\Application $app ) : array Get package service providers.

Private Methods

Method Description
clearGeneratedFiles ( $class )
createClassInstance ( $model ) : mixed
resetModelFactories ( )
resetRoutes ( )

Method Details

getPackageProviders() protected method

Get package service providers.
protected getPackageProviders ( Illuminate\Foundation\Application $app ) : array
$app Illuminate\Foundation\Application
return array

it_accepts_attributes_which_are_saved_to_the_model() public method

it_adds_all_of_the_attributes_that_were_provided_as_columns_in_the_migration() public method

it_adds_attributes_that_are_tagged_as_fillable_to_the_fillable_attributes_array() public method

it_adds_attributes_that_are_tagged_as_hidden_to_the_hidden_attributes_array() public method

it_adds_routes_to_the_existing_routes_file() public method

it_builds_table_columns_based_on_attributes() public method

it_converts_a_php_array_to_a_string_representation_that_can_be_used_to_inject_to_a_template() public method

it_creates_a_migration_based_on_the_generated_model() public method

it_creates_a_model_factory() public method

it_creates_a_model_that_can_be_instantiated() public method

it_creates_a_model_with_the_correct_class_name() public method

it_creates_a_new_controller_for_the_model() public method

it_creates_the_correct_table_in_the_migration() public method

it_does_not_overwrite_an_existing_model() public method

it_generates_a_new_model() public method

it_names_the_migration_correctly() public method

it_splits_a_pipe_separated_list_of_attributes_to_an_array_of_attributes() public method

removeCreatedFile() public method

public removeCreatedFile ( $filename )

removeWhiteSpace() public method

public removeWhiteSpace ( $text )

runArtisanCommand() public method

public runArtisanCommand ( $class, array $parameters = [] ) : Symfony\Component\Console\Tester\CommandTester
$class Command class to be called.
$parameters array
return Symfony\Component\Console\Tester\CommandTester

seeFileWasCreated() public method

public seeFileWasCreated ( $filename )

seeInConsoleOutput() public method

public seeInConsoleOutput ( $text, $console )

seeInFile() public method

public seeInFile ( $text, $file )