public function ArrayPluginDefinitionDecoratorTest::testMergeDefaultArrayDefinition in Plugin 8.2
@covers ::mergeDefaultArrayDefinition
File
- tests/
src/ Unit/ PluginDefinition/ ArrayPluginDefinitionDecoratorTest.php, line 346
Class
- ArrayPluginDefinitionDecoratorTest
- @coversDefaultClass \Drupal\plugin\PluginDefinition\ArrayPluginDefinitionDecorator
Namespace
Drupal\Tests\plugin\Unit\PluginDefinitionCode
public function testMergeDefaultArrayDefinition() {
$other_definition = [
'foo' => $this
->randomMachineName(),
'label' => $this
->randomMachineName(),
];
$this
->assertSame($this->sut, $this->sut
->mergeDefaultArrayDefinition($other_definition));
$this
->assertSame($other_definition['foo'], $this->sut
->getArrayDefinition()['foo']);
$this
->assertNotSame($other_definition['label'], $this->sut
->getArrayDefinition()['label']);
}