artisan('make:crud', ['name' => $this->model_name, '--no-interaction' => true]); $migrationFilePath = database_path('migrations/'.date('Y_m_d_His').'_create_'.$this->table_name.'_table.php'); $this->assertFileExists($migrationFilePath); $modelClassContent = "plural_model_name}Table extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('{$this->table_name}', function (Blueprint \$table) { \$table->increments('id'); \$table->string('name', 60); \$table->string('description')->nullable(); \$table->unsignedInteger('creator_id'); \$table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('{$this->table_name}'); } } "; $this->assertEquals($modelClassContent, file_get_contents($migrationFilePath)); } }