function SearchPageRepositoryTest::testIsSearchActive
Same name in other branches
- 9 core/modules/search/tests/src/Unit/SearchPageRepositoryTest.php \Drupal\Tests\search\Unit\SearchPageRepositoryTest::testIsSearchActive()
- 10 core/modules/search/tests/src/Unit/SearchPageRepositoryTest.php \Drupal\Tests\search\Unit\SearchPageRepositoryTest::testIsSearchActive()
- 11.x core/modules/search/tests/src/Unit/SearchPageRepositoryTest.php \Drupal\Tests\search\Unit\SearchPageRepositoryTest::testIsSearchActive()
Tests the isSearchActive() method.
File
-
core/
modules/ search/ tests/ src/ Unit/ SearchPageRepositoryTest.php, line 97
Class
- SearchPageRepositoryTest
- @coversDefaultClass \Drupal\search\SearchPageRepository @group search
Namespace
Drupal\Tests\search\UnitCode
public function testIsSearchActive() {
$this->query
->expects($this->once())
->method('condition')
->with('status', TRUE)
->will($this->returnValue($this->query));
$this->query
->expects($this->once())
->method('range')
->with(0, 1)
->will($this->returnValue($this->query));
$this->query
->expects($this->once())
->method('execute')
->will($this->returnValue([
'test' => 'test',
]));
$this->assertSame(TRUE, $this->searchPageRepository
->isSearchActive());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.