Drupal 8.0.0 beta 12. More info: https://www.drupal.org/node/2514176

This commit is contained in:
Pantheon Automation 2015-08-17 17:00:26 -07:00 committed by Greg Anderson
commit 9921556621
13277 changed files with 1459781 additions and 0 deletions

View file

@ -0,0 +1,48 @@
<?php
/**
* @file
* Contains \Drupal\search\Tests\SearchPageOverrideTest.
*/
namespace Drupal\search\Tests;
/**
* Tests if the result page can be overridden.
*
* Verifies that a plugin can override the buildResults() method to
* control what the search results page looks like.
*
* @group search
*/
class SearchPageOverrideTest extends SearchTestBase {
/**
* Modules to enable.
*
* @var array
*/
public static $modules = array('search_extra_type');
/**
* A user with permission to administer search.
*
* @var \Drupal\user\UserInterface
*/
public $searchUser;
protected function setUp() {
parent::setUp();
// Login as a user that can create and search content.
$this->searchUser = $this->drupalCreateUser(array('search content', 'administer search'));
$this->drupalLogin($this->searchUser);
}
function testSearchPageHook() {
$keys = 'bike shed ' . $this->randomMachineName();
$this->drupalGet("search/dummy_path", array('query' => array('keys' => $keys)));
$this->assertText('Dummy search snippet', 'Dummy search snippet is shown');
$this->assertText('Test page text is here', 'Page override is working');
}
}