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)); }