assertNotIdenticalResultset example

// Verify the result.     $this->assertSameSize($this->dataSet()$view->result, 'The number of returned rows match.');
    $this->assertIdenticalResultset($view$this->dataSet()[
      'views_test_data_name' => 'name',
      'views_test_data_age' => 'age',
    ]);

    // Execute a random view, we expect the result set to be different.     $view_random = $this->getBasicRandomView();
    $this->executeView($view_random);
    $this->assertSameSize($this->dataSet()$view_random->result, 'The number of returned rows match.');
    $this->assertNotIdenticalResultset($view_random$view->result, [
      'views_test_data_name' => 'views_test_data_name',
      'views_test_data_age' => 'views_test_data_name',
    ]);

    // Execute a second random view, we expect the result set to be different again.     $view_random_2 = $this->getBasicRandomView();
    $this->executeView($view_random_2);
    $this->assertSameSize($this->dataSet()$view_random_2->result, 'The number of returned rows match.');
    $this->assertNotIdenticalResultset($view_random$view->result, [
      'views_test_data_name' => 'views_test_data_name',
      'views_test_data_age' => 'views_test_data_name',
    ]);
'job' => 'Singer',
      ],
      [
        'name' => 'Ringo',
        'job' => 'Drummer',
      ],
      [
        'name' => 'Ginger',
        'job' => NULL,
      ],
    ];
    $this->assertNotIdenticalResultset($view$resultset$this->columnMap);
  }

  /** * Additional data to test the NULL issue. */
  protected function dataSet() {
    $data_set = parent::dataSet();
    $data_set[] = [
      'name' => 'Ginger',
      'age' => 25,
      'job' => NULL,
      
Home | Imprint | This part of the site doesn't use cookies.