public function testDataSourceWithOptions() { $options = $sortedOptions = ['foo' => 'bar', 'baz' => 'bat']; ksort($sortedOptions); $this->dataSourceBuilder->expects($this->once())->method('createDataSource')->with($this->identicalTo($sortedOptions))->will($this->returnValue($dataSource = $this->createDataSourceMock())); $this->assertSame($dataSource, $this->view->getDataSource($options)); $this->assertSame($dataSource, $this->view->getDataSource($sortedOptions)); }
/** * @param GridInterface $definition * @param DataSourceBuilderInterface $dataSourceBuilder * @param FormView $form * @param FormView $batchForm */ public function __construct(GridInterface $definition, DataSourceBuilderInterface $dataSourceBuilder, FormView $form = null, FormView $batchForm = null) { parent::__construct($definition, $dataSourceBuilder); $this->setForm($form); $this->setBatchForm($batchForm); }