You are here

function FilterUserUIDTest::testCommentUserUIDTest in Views (for Drupal 7) 8.3

File

lib/Drupal/views/Tests/Comment/FilterUserUIDTest.php, line 25
Definition of Drupal\views\Tests\Comment\FilterUserUIDTest.

Class

FilterUserUIDTest
Tests the filter_comment_user_uid handler.

Namespace

Drupal\views\Tests\Comment

Code

function testCommentUserUIDTest() {
  $this->view
    ->setItem('default', 'argument', 'uid_touch', NULL);
  $options = array(
    'id' => 'uid_touch',
    'table' => 'node',
    'field' => 'uid_touch',
    'value' => array(
      $this->loggedInUser->uid,
    ),
  );
  $this->view
    ->addItem('default', 'filter', 'node', 'uid_touch', $options);
  $this
    ->executeView($this->view, array(
    $this->account->uid,
  ));
  $result_set = array(
    array(
      'nid' => $this->node_user_posted->nid,
    ),
    array(
      'nid' => $this->node_user_commented->nid,
    ),
  );
  $this->column_map = array(
    'nid' => 'nid',
  );
  $this
    ->assertIdenticalResultset($this->view, $result_set, $this->column_map);
}