Flugg\Responder\Tests\TestCase::createTestModelWithNoTransformer PHP Méthode

createTestModelWithNoTransformer() protected méthode

Creates a new adjustable model without an attached transformer for testing purposes.
protected createTestModelWithNoTransformer ( array $attributes = [] ) : Model
$attributes array
Résultat Illuminate\Database\Eloquent\Model
    protected function createTestModelWithNoTransformer(array $attributes = []) : Model
    {
        $model = new class extends Model
        {
            protected $fillable = ['name', 'price', 'is_rotten'];
            protected $table = 'fruits';
        };
        return $this->storeModel($model, $attributes);
    }