Flugg\Responder\Tests\TestCase::createTestModelWithNullTransformer PHP Method

createTestModelWithNullTransformer() protected method

Creates a new adjustable model with a null transformer for testing purposes.
protected createTestModelWithNullTransformer ( array $attributes = [] ) : Model
$attributes array
return Illuminate\Database\Eloquent\Model
    protected function createTestModelWithNullTransformer(array $attributes = []) : Model
    {
        $model = new class extends Model implements Transformable
        {
            protected $fillable = ['name', 'price', 'is_rotten'];
            protected $table = 'fruits';
            public static function transformer()
            {
                return null;
            }
        };
        return $this->storeModel($model, $attributes);
    }