X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fcomment%2Ftests%2Fsrc%2FKernel%2FViews%2FCommentLinksTest.php;fp=web%2Fcore%2Fmodules%2Fcomment%2Ftests%2Fsrc%2FKernel%2FViews%2FCommentLinksTest.php;h=acd2cf6e72c4a61bec4d6636affaa34671bf0238;hp=08a326dde426d7cff72ec2dc0f6a6105e7700cdf;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hpb=74df008bdbb3a11eeea356744f39b802369bda3c diff --git a/web/core/modules/comment/tests/src/Kernel/Views/CommentLinksTest.php b/web/core/modules/comment/tests/src/Kernel/Views/CommentLinksTest.php index 08a326dde..acd2cf6e7 100644 --- a/web/core/modules/comment/tests/src/Kernel/Views/CommentLinksTest.php +++ b/web/core/modules/comment/tests/src/Kernel/Views/CommentLinksTest.php @@ -2,7 +2,6 @@ namespace Drupal\Tests\comment\Kernel\Views; -use Drupal\comment\CommentInterface; use Drupal\comment\CommentManagerInterface; use Drupal\Core\Session\AnonymousUserSession; use Drupal\Core\Url; @@ -84,7 +83,7 @@ class CommentLinksTest extends CommentViewsKernelTestBase { $this->assertEqual(\Drupal::l('Approve', $url), (string) $approve_comment, 'Found a comment approve link for an unapproved comment.'); // Approve the comment. - $comment->setPublished(CommentInterface::PUBLISHED); + $comment->setPublished(); $comment->save(); $view = Views::getView('test_comment'); $view->preview(); @@ -97,7 +96,7 @@ class CommentLinksTest extends CommentViewsKernelTestBase { // anonymous user. $account_switcher->switchTo(new AnonymousUserSession()); // Set the comment as unpublished again. - $comment->setPublished(CommentInterface::NOT_PUBLISHED); + $comment->setUnpublished(); $comment->save(); $view = Views::getView('test_comment'); @@ -168,7 +167,7 @@ class CommentLinksTest extends CommentViewsKernelTestBase { $this->assertFalse((string) $replyto_comment, "I can't reply to an unapproved comment."); // Approve the comment. - $comment->setPublished(CommentInterface::PUBLISHED); + $comment->setPublished(); $comment->save(); $view = Views::getView('test_comment'); $view->preview();