UnpublishByKeywordActionTest.php

Same filename in this branch
  1. 10 core/modules/node/tests/src/Kernel/Action/UnpublishByKeywordActionTest.php
  2. 10 core/modules/action/tests/src/Kernel/UnpublishByKeywordActionTest.php
Same filename in other branches
  1. 9 core/modules/node/tests/src/Kernel/Action/UnpublishByKeywordActionTest.php
  2. 8.9.x core/modules/node/tests/src/Kernel/Action/UnpublishByKeywordActionTest.php
  3. 11.x core/modules/node/tests/src/Kernel/Action/UnpublishByKeywordActionTest.php

Namespace

Drupal\Tests\node\Unit\Action

File

core/modules/node/tests/src/Unit/Action/UnpublishByKeywordActionTest.php

View source
<?php

declare (strict_types=1);
namespace Drupal\Tests\node\Unit\Action;

use Drupal\node\Plugin\Action\UnpublishByKeywordNode;
use Drupal\Tests\UnitTestCase;

/**
 * @group node
 * @group legacy
 */
class UnpublishByKeywordActionTest extends UnitTestCase {
    
    /**
     * Tests deprecation of \Drupal\node\Plugin\Action\UnpublishByKeywordNode.
     */
    public function testUnpublishByKeywordAction() : void {
        $this->expectDeprecation('Drupal\\node\\Plugin\\Action\\UnpublishByKeywordNode is deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. Use \\Drupal\\action\\Plugin\\Action\\UnpublishByKeywordNode instead. See https://www.drupal.org/node/3424506');
        $this->assertIsObject(new UnpublishByKeywordNode([], 'foo', []));
    }

}

Classes

Title Deprecated Summary
UnpublishByKeywordActionTest @group node @group legacy

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.