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

transformMethodShouldFailIfNoModelIsFound() public method

Test that the [transform] method throws an [\InvalidArgumentException] when the given data doesn't contain, or is itself, an Eloquent model.
    public function transformMethodShouldFailIfNoModelIsFound()
    {
        // Arrange...
        $responseBuilder = $this->app->make('responder.success');
        $this->expectException(InvalidArgumentException::class);
        // Act...
        $responseBuilder->transform('foo');
    }
SuccessResponseBuilderTest