protected function CoreSearchTest::setUp in Snowball Stemmer 8
Same name and namespace in other branches
- 2.x tests/src/Kernel/CoreSearchTest.php \Drupal\Tests\snowball_stemmer\Kernel\CoreSearchTest::setUp()
Creates a new processor object for use in the tests.
Overrides KernelTestBase::setUp
File
- tests/
src/ Kernel/ CoreSearchTest.php, line 25
Class
- CoreSearchTest
- Tests the search_excerpt() function.
Namespace
Drupal\Tests\snowball_stemmer\KernelCode
protected function setUp() {
parent::setUp();
$this->stemmerService = $this
->getMockBuilder('Drupal\\snowball_stemmer\\Stemmer')
->disableOriginalConstructor()
->getMock();
$this->container
->set('snowball_stemmer.stemmer', $this->stemmerService);
$this->languageManager = $this
->createMock(LanguageManagerInterface::class);
$this->container
->set('language_manager', $this->languageManager);
\Drupal::setContainer($this->container);
}