1 user_views.test public UserViewsTestCase::testRelationship()

Add a view which has no explicit relationship to the author and check the result.

@todo: Remove the following comment once the relationship is required. One day a view will require the relationship so it should still work

File

core/modules/user/tests/user_views.test, line 33
Definition of UserViewsTestCase.

Class

UserViewsTestCase
Tests basic user module integration into views.

Code

public function testRelationship() {
  $view = $this->test_view_user_relationship();

  $view->execute_display();
  $expected = array();
  for ($i = 0; $i <= 1; $i++) {
    $expected[$i] = array(
      'node_title' => $this->nodes[$i]->title,
      'users_uid' => $this->nodes[$i]->uid,
      'users_name' => $this->users[$i]->name,
    );
  }
  $this->assertIdenticalResultset($view, $expected);
}