Flugg\Responder\Tests\Unit\SuccessResponseBuilderTest::transformMethodShouldCreateClosureIfNoTransformerIsFound PHP Method

transformMethodShouldCreateClosureIfNoTransformerIsFound() public method

Test that the [transform] method creates a closure transformer substitute from the model's fillable array.
    public function transformMethodShouldCreateClosureIfNoTransformerIsFound()
    {
        // Arrange...
        $responseBuilder = $this->app->make('responder.success');
        $model = $this->makeModel();
        // Act...
        $responseBuilder->transform($model);
        // Assert...
        $this->assertInstanceOf(Closure::class, $responseBuilder->getResource()->getTransformer());
    }
SuccessResponseBuilderTest