ArgumentUserUIDTest.php 1.01 KB
Newer Older
1 2 3 4
<?php

/**
 * @file
5
 * Contains \Drupal\comment\Tests\Views\ArgumentUserUIDTest.
6 7
 */

8
namespace Drupal\comment\Tests\Views;
9 10 11 12 13 14

/**
 * Tests the argument_comment_user_uid handler.
 */
class ArgumentUserUIDTest extends CommentTestBase {

15 16 17 18 19 20 21
  /**
   * Views used by this test.
   *
   * @var array
   */
  public static $testViews = array('test_comment_user_uid');

22 23 24 25
  public static function getInfo() {
    return array(
      'name' => 'Comment: User UID Argument',
      'description' => 'Tests the user posted or commented argument handler.',
26
      'group' => 'Views module integration',
27 28 29 30
    );
  }

  function testCommentUserUIDTest() {
31
    $view = views_get_view('test_comment_user_uid');
32
    $this->executeView($view, array($this->account->id()));
33 34 35 36 37 38 39 40
    $result_set = array(
      array(
        'nid' => $this->node_user_posted->nid,
      ),
      array(
        'nid' => $this->node_user_commented->nid,
      ),
    );
41 42
    $column_map = array('nid' => 'nid');
    $this->assertIdenticalResultset($view, $result_set, $column_map);
43 44 45
  }

}