protected function SearchPageRepositoryTest::setUp in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/search/tests/src/Unit/SearchPageRepositoryTest.php \Drupal\Tests\search\Unit\SearchPageRepositoryTest::setUp()
Overrides UnitTestCase::setUp
File
- core/
modules/ search/ tests/ src/ Unit/ SearchPageRepositoryTest.php, line 51 - Contains \Drupal\Tests\search\Unit\SearchPageRepositoryTest.
Class
- SearchPageRepositoryTest
- @coversDefaultClass \Drupal\search\SearchPageRepository @group search
Namespace
Drupal\Tests\search\UnitCode
protected function setUp() {
$this->query = $this
->getMock('Drupal\\Core\\Entity\\Query\\QueryInterface');
$this->storage = $this
->getMock('Drupal\\Core\\Config\\Entity\\ConfigEntityStorageInterface');
$this->storage
->expects($this
->any())
->method('getQuery')
->will($this
->returnValue($this->query));
$entity_manager = $this
->getMock('Drupal\\Core\\Entity\\EntityManagerInterface');
$entity_manager
->expects($this
->any())
->method('getStorage')
->will($this
->returnValue($this->storage));
$this->configFactory = $this
->getMock('Drupal\\Core\\Config\\ConfigFactoryInterface');
$this->searchPageRepository = new SearchPageRepository($this->configFactory, $entity_manager);
}