1.20.x 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
- modules/
user/ tests/ user_views.test, line 34 - 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);
}