Mercurial > hg > isophonics-drupal-site
view core/modules/search/tests/src/Functional/SearchTestBase.php @ 19:fa3358dc1485 tip
Add ndrum files
author | Chris Cannam |
---|---|
date | Wed, 28 Aug 2019 13:14:47 +0100 |
parents | 129ea1e6d783 |
children |
line wrap: on
line source
<?php namespace Drupal\Tests\search\Functional; @trigger_error(__NAMESPACE__ . '\SearchTestBase is deprecated in Drupal 8.6.x and will be removed before Drupal 9.0.0. Instead, use \Drupal\Tests\BrowserTestBase. See https://www.drupal.org/node/2979950.', E_USER_DEPRECATED); use Drupal\Tests\BrowserTestBase; /** * Defines the common search test code. * * @deprecated in Drupal 8.6.0 and will be removed in Drupal 9.0.0. Use * \Drupal\Tests\BrowserTestBase instead. * * @see https://www.drupal.org/node/2979950 */ abstract class SearchTestBase extends BrowserTestBase { /** * Modules to enable. * * @var array */ public static $modules = ['node', 'search', 'dblog']; protected function setUp() { parent::setUp(); // Create Basic page and Article node types. if ($this->profile != 'standard') { $this->drupalCreateContentType(['type' => 'page', 'name' => 'Basic page']); $this->drupalCreateContentType(['type' => 'article', 'name' => 'Article']); } } /** * Submission of a form via press submit button. * * @param string $path * Location of the form to be submitted: either a Drupal path, absolute * path, or NULL to use the current page. * @param array $edit * Form field data to submit. Unlike drupalPostForm(), this does not support * file uploads. * @param string $submit * Value of the submit button to submit clicking. Unlike drupalPostForm(), * this does not support AJAX. * @param string $form_html_id * (optional) HTML ID of the form, to disambiguate. * * @deprecated in Drupal 8.6.x, to be removed before Drupal 9.0.x. Use * \Drupal\Tests\BrowserTestBase::drupalPostForm() instead. * * @see https://www.drupal.org/node/2979950 */ protected function submitGetForm($path, $edit, $submit, $form_html_id = NULL) { @trigger_error(__CLASS__ . '::' . __FUNCTION__ . '() is deprecated in Drupal 8.6.x, for removal before the Drupal 9.0.0 release. Use \Drupal\Tests\BrowserTestBase::drupalPostForm() instead. See https://www.drupal.org/node/2979950.', E_USER_DEPRECATED); $this->drupalPostForm($path, $edit, $submit, [], $form_html_id); } }