Flugg\Responder\Tests\TestCase::mockBuilder PHP Метод

mockBuilder() защищенный Метод

Create a mock of the Eloquent builder with a mock of the [get] method which returns the given data.
protected mockBuilder ( array $data = null ) : Mockery\MockInterface
$data array
Результат Mockery\MockInterface
    protected function mockBuilder(array $data = null)
    {
        $builder = Mockery::spy(EloquentBuilder::class);
        $builder->shouldReceive('get')->andReturn(collect($data));
        return $builder;
    }