CommentOperationsTest.php in Zircon Profile 8
File
core/modules/comment/src/Tests/Views/CommentOperationsTest.php
View source
<?php
namespace Drupal\comment\Tests\Views;
class CommentOperationsTest extends CommentTestBase {
public static $testViews = [
'test_comment_operations',
];
public function testCommentOperations() {
$admin_account = $this
->drupalCreateUser([
'administer comments',
]);
$this
->drupalLogin($admin_account);
$this
->drupalGet('test-comment-operations');
$this
->assertResponse(200);
$operation = $this
->cssSelect('.views-field-operations li.edit a');
$this
->assertEqual(count($operation), 1, 'Found edit operation for comment.');
$operation = $this
->cssSelect('.views-field-operations li.delete a');
$this
->assertEqual(count($operation), 1, 'Found delete operation for comment.');
}
}