Mercurial > hg > isophonics-drupal-site
comparison core/modules/search/tests/src/Functional/SearchLanguageTest.php @ 18:af1871eacc83
Update to Drupal core 8.7.1
author | Chris Cannam |
---|---|
date | Thu, 09 May 2019 15:33:08 +0100 |
parents | 129ea1e6d783 |
children |
comparison
equal
deleted
inserted
replaced
17:129ea1e6d783 | 18:af1871eacc83 |
---|---|
1 <?php | 1 <?php |
2 | 2 |
3 namespace Drupal\Tests\search\Functional; | 3 namespace Drupal\Tests\search\Functional; |
4 | 4 |
5 use Drupal\Core\Url; | |
5 use Drupal\field\Entity\FieldStorageConfig; | 6 use Drupal\field\Entity\FieldStorageConfig; |
6 use Drupal\language\Entity\ConfigurableLanguage; | 7 use Drupal\language\Entity\ConfigurableLanguage; |
7 use Drupal\Tests\BrowserTestBase; | 8 use Drupal\Tests\BrowserTestBase; |
8 | 9 |
9 /** | 10 /** |
99 $this->assertText(t('English'), 'English is a possible choice.'); | 100 $this->assertText(t('English'), 'English is a possible choice.'); |
100 $this->assertText(t('French'), 'French is a possible choice.'); | 101 $this->assertText(t('French'), 'French is a possible choice.'); |
101 | 102 |
102 // Ensure selecting no language does not make the query different. | 103 // Ensure selecting no language does not make the query different. |
103 $this->drupalPostForm('search/node', [], 'edit-submit--2'); | 104 $this->drupalPostForm('search/node', [], 'edit-submit--2'); |
104 $this->assertUrl(\Drupal::url('search.view_node_search', [], ['query' => ['keys' => ''], 'absolute' => TRUE]), [], 'Correct page redirection, no language filtering.'); | 105 $this->assertUrl(Url::fromRoute('search.view_node_search', [], ['query' => ['keys' => ''], 'absolute' => TRUE])->toString(), [], 'Correct page redirection, no language filtering.'); |
105 | 106 |
106 // Pick French and ensure it is selected. | 107 // Pick French and ensure it is selected. |
107 $edit = ['language[fr]' => TRUE]; | 108 $edit = ['language[fr]' => TRUE]; |
108 $this->drupalPostForm('search/node', $edit, 'edit-submit--2'); | 109 $this->drupalPostForm('search/node', $edit, 'edit-submit--2'); |
109 // Get the redirected URL. | 110 // Get the redirected URL. |