Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / comment / tests / src / Functional / Views / CommentOperationsTest.php
1 <?php
2
3 namespace Drupal\Tests\comment\Functional\Views;
4
5 /**
6  * Tests comment operations.
7  *
8  * @group comment
9  */
10 class CommentOperationsTest extends CommentTestBase {
11
12   /**
13    * Views used by this test.
14    *
15    * @var array
16    */
17   public static $testViews = ['test_comment_operations'];
18
19   /**
20    * Test the operations field plugin.
21    */
22   public function testCommentOperations() {
23     $admin_account = $this->drupalCreateUser(['administer comments']);
24     $this->drupalLogin($admin_account);
25     $this->drupalGet('test-comment-operations');
26     $this->assertResponse(200);
27     $operation = $this->cssSelect('.views-field-operations li.edit a');
28     $this->assertEqual(count($operation), 1, 'Found edit operation for comment.');
29     $operation = $this->cssSelect('.views-field-operations li.delete a');
30     $this->assertEqual(count($operation), 1, 'Found delete operation for comment.');
31   }
32
33 }