class PluginWithFormsTraitTest extends UnitTestCase
{ /**
* @covers ::getFormClass
* @covers ::hasFormClass
* @dataProvider providerGetFormClass
*/
public function testGetFormClass(PluginWithFormsInterface
$block_plugin,
$operation,
$expected_class) { $this->
assertSame($expected_class,
$block_plugin->
getFormClass($operation));
$this->
assertSame($expected_class !== NULL,
$block_plugin->
hasFormClass($operation));
} /**
* @return array
*/
public function providerGetFormClass() { $block_plugin_without_forms =
new TestClass([], 'block_plugin_without_forms',
[ 'provider' => 'block_test',
]);
// A block plugin that has a form defined for the 'poke' operation.
$block_plugin_with_forms =
new TestClass([], 'block_plugin_with_forms',
[