spec\Sylius\Bundle\GridBundle\Renderer\TwigGridRendererSpec::it_renders_a_field_with_data_via_appropriate_field_type PHP Метод

it_renders_a_field_with_data_via_appropriate_field_type() публичный Метод

public it_renders_a_field_with_data_via_appropriate_field_type ( Sylius\Component\Grid\View\GridViewInterface $gridView, Sylius\Component\Grid\Definition\Field $field, Sylius\Component\Registry\ServiceRegistryInterface $fieldsRegistry, Sylius\Component\Grid\FieldTypes\FieldTypeInterface $fieldType )
$gridView Sylius\Component\Grid\View\GridViewInterface
$field Sylius\Component\Grid\Definition\Field
$fieldsRegistry Sylius\Component\Registry\ServiceRegistryInterface
$fieldType Sylius\Component\Grid\FieldTypes\FieldTypeInterface
    function it_renders_a_field_with_data_via_appropriate_field_type(GridViewInterface $gridView, Field $field, ServiceRegistryInterface $fieldsRegistry, FieldTypeInterface $fieldType)
    {
        $field->getType()->willReturn('string');
        $fieldsRegistry->get('string')->willReturn($fieldType);
        $fieldType->configureOptions(Argument::type(OptionsResolver::class))->will(function ($args) {
            $args[0]->setRequired('foo');
        });
        $field->getOptions()->willReturn(['foo' => 'bar']);
        $fieldType->render($field, 'Value', ['foo' => 'bar'])->willReturn('<strong>Value</strong>');
        $this->renderField($gridView, $field, 'Value')->shouldReturn('<strong>Value</strong>');
    }