function UnpublishByKeywordCommentTest::testUnpublishByKeywordAction
Tests deprecation message.
File
-
core/
modules/ comment/ tests/ src/ Unit/ Action/ UnpublishByKeywordCommentTest.php, line 21
Class
- UnpublishByKeywordCommentTest
- @group comment @group legacy
Namespace
Drupal\Tests\comment\Unit\ActionCode
public function testUnpublishByKeywordAction() : void {
$comment_view_builder = $this->createMock(EntityViewBuilderInterface::class);
$renderer = $this->createMock(RendererInterface::class);
$this->expectDeprecation('Drupal\\comment\\Plugin\\Action\\UnpublishByKeywordComment is deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. Use \\Drupal\\action\\Plugin\\Action\\UnpublishByKeywordComment instead. See https://www.drupal.org/node/3424506');
$this->assertIsObject(new UnpublishByKeywordComment([], 'foo', [], $comment_view_builder, $renderer));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.