Update to Drupal 8.0.0-beta15. For more information, see: https://www.drupal.org/node/2563023

This commit is contained in:
Pantheon Automation 2015-09-04 13:20:09 -07:00 committed by Greg Anderson
parent 2720a9ec4b
commit f3791f1da3
1898 changed files with 54300 additions and 11481 deletions

View file

@ -91,11 +91,11 @@ class CommentFieldNameTest extends CommentTestBase {
$output = $renderer->executeInRenderContext(new RenderContext(), function () use ($view) {
return $view->field['field_name']->advancedRender($view->result[0]);
});
$this->assertIdentical($this->comment->getFieldName(), $output);
$this->assertEqual($this->comment->getFieldName(), $output);
$output = $renderer->executeInRenderContext(new RenderContext(), function () use ($view) {
return $view->field['field_name']->advancedRender($view->result[1]);
});
$this->assertIdentical($this->customComment->getFieldName(), $output);
$this->assertEqual($this->customComment->getFieldName(), $output);
}
}

View file

@ -12,7 +12,7 @@ use Drupal\Core\Session\AnonymousUserSession;
use Drupal\user\Entity\Role;
use Drupal\user\Entity\User;
use Drupal\views\Entity\View;
use Drupal\views\Tests\ViewUnitTestBase;
use Drupal\views\Tests\ViewKernelTestBase;
use Drupal\views\Views;
/**
@ -20,7 +20,7 @@ use Drupal\views\Views;
*
* @group comment
*/
class CommentUserNameTest extends ViewUnitTestBase {
class CommentUserNameTest extends ViewKernelTestBase {
/**
* Admin user.
@ -50,6 +50,7 @@ class CommentUserNameTest extends ViewUnitTestBase {
$storage
->create(array(
'uid' => 0,
'name' => '',
'status' => 0,
))
->save();
@ -75,6 +76,7 @@ class CommentUserNameTest extends ViewUnitTestBase {
$comment = Comment::create([
'subject' => 'My comment title',
'uid' => $this->adminUser->id(),
'name' => $this->adminUser->label(),
'entity_type' => 'entity_test',
'comment_type' => 'entity_test',
'status' => 1,

View file

@ -0,0 +1,41 @@
<?php
/**
* @file
* Contains \Drupal\comment\Tests\Views\NodeCommentsTest.
*/
namespace Drupal\comment\Tests\Views;
/**
* Tests comments on nodes.
*
* @group comment
*/
class NodeCommentsTest extends CommentTestBase {
/**
* Modules to install.
*
* @var array
*/
public static $modules = ['history'];
/**
* Views used by this test.
*
* @var array
*/
public static $testViews = ['test_new_comments'];
/**
* Test the new comments field plugin.
*/
public function testNewComments() {
$this->drupalGet('test-new-comments');
$this->assertResponse(200);
$new_comments = $this->cssSelect(".views-field-new-comments a:contains('1')");
$this->assertEqual(count($new_comments), 1, 'Found the number of new comments for a certain node.');
}
}