public function DefaultSingleLazyPluginCollectionTest::testGetInstanceIds in Drupal 9
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Plugin/DefaultSingleLazyPluginCollectionTest.php \Drupal\Tests\Core\Plugin\DefaultSingleLazyPluginCollectionTest::testGetInstanceIds()
@covers ::getInstanceIds
File
- core/
tests/ Drupal/ Tests/ Core/ Plugin/ DefaultSingleLazyPluginCollectionTest.php, line 65
Class
- DefaultSingleLazyPluginCollectionTest
- @coversDefaultClass \Drupal\Core\Plugin\DefaultSingleLazyPluginCollection @group Plugin
Namespace
Drupal\Tests\Core\PluginCode
public function testGetInstanceIds() {
$this
->setupPluginCollection($this
->any());
$this
->assertEquals([
'apple' => 'apple',
], $this->defaultPluginCollection
->getInstanceIds());
$this->defaultPluginCollection
->addInstanceId('banana', [
'id' => 'banana',
'key' => 'other_value',
]);
$this
->assertEquals([
'banana' => 'banana',
], $this->defaultPluginCollection
->getInstanceIds());
}