class PluginHelperLegacyTest
Same name in other branches
- 10 core/tests/Drupal/Tests/Component/Plugin/PluginHelperLegacyTest.php \Drupal\Tests\Component\Plugin\PluginHelperLegacyTest
@coversDefaultClass \Drupal\Component\Plugin\PluginHelper @group Plugin @group legacy
Hierarchy
- class \Drupal\Tests\Component\Plugin\PluginHelperLegacyTest extends \PHPUnit\Framework\TestCase uses \Symfony\Bridge\PhpUnit\ExpectDeprecationTrait
Expanded class hierarchy of PluginHelperLegacyTest
File
-
core/
tests/ Drupal/ Tests/ Component/ Plugin/ PluginHelperLegacyTest.php, line 17
Namespace
Drupal\Tests\Component\PluginView source
class PluginHelperLegacyTest extends TestCase {
use ExpectDeprecationTrait;
public function testPluginHelperDeprecation() : void {
$this->expectDeprecation('The Drupal\\Component\\Plugin\\PluginHelper is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. Instead, use instanceof() to check for \\Drupal\\Component\\Plugin\\ConfigurableInterface. See https://www.drupal.org/node/3198285');
$this->assertEquals($this instanceof ConfigurableInterface, PluginHelper::isConfigurable($this));
$plugin = $this->createMock(ConfigurableInterface::class);
$this->assertEquals($plugin instanceof ConfigurableInterface, PluginHelper::isConfigurable($plugin));
}
}
Members
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.