ViewsDataHelper example

/** * Tests fetchFields. */
  public function testFetchFields() {
    $views_data = $this->getMockBuilder('Drupal\views\ViewsData')
      ->disableOriginalConstructor()
      ->getMock();
    $views_data->expects($this->once())
      ->method('getAll')
      ->willReturn($this->viewsData());

    $data_helper = new ViewsDataHelper($views_data);

    $expected = [
      'field' => [
        'age',
        'created',
        'job',
        'name',
        'status',
      ],
      'argument' => [
        'age',
        
Home | Imprint | This part of the site doesn't use cookies.