function SearchPluginCollectionTest::setUp

Same name in other branches
  1. 9 core/modules/search/tests/src/Unit/SearchPluginCollectionTest.php \Drupal\Tests\search\Unit\SearchPluginCollectionTest::setUp()
  2. 8.9.x core/modules/search/tests/src/Unit/SearchPluginCollectionTest.php \Drupal\Tests\search\Unit\SearchPluginCollectionTest::setUp()
  3. 11.x core/modules/search/tests/src/Unit/SearchPluginCollectionTest.php \Drupal\Tests\search\Unit\SearchPluginCollectionTest::setUp()

Overrides UnitTestCase::setUp

File

core/modules/search/tests/src/Unit/SearchPluginCollectionTest.php, line 40

Class

SearchPluginCollectionTest
@coversDefaultClass \Drupal\search\Plugin\SearchPluginCollection @group search

Namespace

Drupal\Tests\search\Unit

Code

protected function setUp() : void {
    parent::setUp();
    $this->pluginManager = $this->createMock('Drupal\\Component\\Plugin\\PluginManagerInterface');
    $this->searchPluginCollection = new SearchPluginCollection($this->pluginManager, 'banana', [
        'id' => 'banana',
        'color' => 'yellow',
    ], 'fruit_stand');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.