Révision 5d12d676
Ajouté par Assos Assos il y a environ 6 ans
drupal7/sites/all/modules/views/tests/comment/views_handler_argument_comment_user_uid.test | ||
---|---|---|
20 | 20 |
/** |
21 | 21 |
* Post comment. |
22 | 22 |
* |
23 |
* @param $node |
|
23 |
* @param object $node
|
|
24 | 24 |
* Node to post comment on. |
25 |
* @param $comment |
|
26 |
* Comment to save |
|
25 |
* @param array $comment
|
|
26 |
* Comment to save.
|
|
27 | 27 |
*/ |
28 | 28 |
function postComment($node, $comment = array()) { |
29 | 29 |
$comment += array( |
... | ... | |
38 | 38 |
function setUp() { |
39 | 39 |
parent::setUp(); |
40 | 40 |
|
41 |
// Add two users, create a node with the user1 as author and another node with user2 as author.
|
|
42 |
// For the second node add a comment from user1. |
|
41 |
// Add two users, create a node with the user1 as author and another node |
|
42 |
// with user2 as author. For the second node add a comment from user1.
|
|
43 | 43 |
$this->account = $this->drupalCreateUser(); |
44 | 44 |
$this->account2 = $this->drupalCreateUser(); |
45 | 45 |
$this->drupalLogin($this->account); |
... | ... | |
51 | 51 |
function testCommentUserUidTest() { |
52 | 52 |
$view = $this->view_comment_user_uid(); |
53 | 53 |
|
54 |
|
|
55 | 54 |
$this->executeView($view, array($this->account->uid)); |
56 | 55 |
$resultset = array( |
57 | 56 |
array( |
... | ... | |
67 | 66 |
} |
68 | 67 |
|
69 | 68 |
function view_comment_user_uid() { |
70 |
$view = new view; |
|
69 |
$view = new view();
|
|
71 | 70 |
$view->name = 'test_comment_user_uid'; |
72 | 71 |
$view->description = ''; |
73 | 72 |
$view->tag = 'default'; |
... | ... | |
103 | 102 |
|
104 | 103 |
return $view; |
105 | 104 |
} |
105 |
|
|
106 | 106 |
} |
Formats disponibles : Unified diff
Weekly update of contrib modules