public function SearchPluginCollectionTest::testGet in Drupal 9
Same name and namespace in other branches
- 8 core/modules/search/tests/src/Unit/SearchPluginCollectionTest.php \Drupal\Tests\search\Unit\SearchPluginCollectionTest::testGet()
Tests the get() method.
File
- core/
modules/ search/ tests/ src/ Unit/ SearchPluginCollectionTest.php, line 46
Class
- SearchPluginCollectionTest
- @coversDefaultClass \Drupal\search\Plugin\SearchPluginCollection @group search
Namespace
Drupal\Tests\search\UnitCode
public function testGet() {
$plugin = $this
->createMock('Drupal\\search\\Plugin\\SearchInterface');
$this->pluginManager
->expects($this
->once())
->method('createInstance')
->will($this
->returnValue($plugin));
$this
->assertSame($plugin, $this->searchPluginCollection
->get('banana'));
}