function it_converts_an_array_to_grid_definition()
 {
     $grid = Grid::fromCodeAndDriverConfiguration('sylius_admin_tax_category', 'doctrine/orm', ['resource' => 'sylius.tax_category']);
     $grid->setSorting(['name' => 'desc']);
     $codeField = Field::fromNameAndType('code', 'string');
     $codeField->setLabel('System Code');
     $codeField->setPath('method.code');
     $codeField->setOptions(['template' => 'bar.html.twig']);
     $grid->addField($codeField);
     $viewAction = Action::fromNameAndType('view', 'link');
     $viewAction->setLabel('Display Tax Category');
     $viewAction->setOptions(['foo' => 'bar']);
     $defaultActionGroup = ActionGroup::named('default');
     $defaultActionGroup->addAction($viewAction);
     $grid->addActionGroup($defaultActionGroup);
     $filter = Filter::fromNameAndType('enabled', 'boolean');
     $grid->addFilter($filter);
     $definitionArray = ['driver' => ['name' => 'doctrine/orm', 'options' => ['resource' => 'sylius.tax_category']], 'sorting' => ['name' => 'desc'], 'fields' => ['code' => ['type' => 'string', 'label' => 'System Code', 'path' => 'method.code', 'options' => ['template' => 'bar.html.twig']]], 'filters' => ['enabled' => ['type' => 'boolean']], 'actions' => ['default' => ['view' => ['type' => 'link', 'label' => 'Display Tax Category', 'options' => ['foo' => 'bar']]]]];
     $this->convert('sylius_admin_tax_category', $definitionArray)->shouldBeSameGridAs($grid);
 }