function SearchPageRepositoryTest::testClearDefaultSearchPage
Same name in other branches
- 9 core/modules/search/tests/src/Unit/SearchPageRepositoryTest.php \Drupal\Tests\search\Unit\SearchPageRepositoryTest::testClearDefaultSearchPage()
- 8.9.x core/modules/search/tests/src/Unit/SearchPageRepositoryTest.php \Drupal\Tests\search\Unit\SearchPageRepositoryTest::testClearDefaultSearchPage()
- 10 core/modules/search/tests/src/Unit/SearchPageRepositoryTest.php \Drupal\Tests\search\Unit\SearchPageRepositoryTest::testClearDefaultSearchPage()
Tests the clearDefaultSearchPage() method.
File
-
core/
modules/ search/ tests/ src/ Unit/ SearchPageRepositoryTest.php, line 147
Class
- SearchPageRepositoryTest
- @coversDefaultClass \Drupal\search\SearchPageRepository @group search
Namespace
Drupal\Tests\search\UnitCode
public function testClearDefaultSearchPage() : void {
$config = $this->getMockBuilder('Drupal\\Core\\Config\\Config')
->disableOriginalConstructor()
->getMock();
$config->expects($this->once())
->method('clear')
->with('default_page')
->willReturn($config);
$this->configFactory
->expects($this->once())
->method('getEditable')
->with('search.settings')
->willReturn($config);
$this->searchPageRepository
->clearDefaultSearchPage();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.