diff --git a/src/Tests/LanguageIntegrationTest.php b/src/Tests/LanguageIntegrationTest.php index 416e40b..a80413d 100644 --- a/src/Tests/LanguageIntegrationTest.php +++ b/src/Tests/LanguageIntegrationTest.php @@ -2,10 +2,7 @@ namespace Drupal\facets\Tests; -use Drupal\Core\Url; -use Drupal\facets\Entity\Facet; use Drupal\language\Entity\ConfigurableLanguage; -use Drupal\search_api\Tests\ExampleContentTrait; /** * Tests the integration with the language module. @@ -13,7 +10,7 @@ use Drupal\search_api\Tests\ExampleContentTrait; * @group facets */ class LanguageIntegrationTest extends WebTestBase { - + /** * {@inheritdoc} */ @@ -54,16 +51,13 @@ class LanguageIntegrationTest extends WebTestBase { $facet_name = 'Owl'; $this->createFacet($facet_name, $facet_id); - // Create an extra language. - ConfigurableLanguage::create(array('id' => 'xx-lolspeak', 'label' => 'Lolspeak'))->save(); - - $this->drupalGet('search-api-test-fulltext'); - $this->assertLink('item'); - $this->assertLink('article'); + ConfigurableLanguage::create(['id' => 'xx-lolspeak'])->save(); + // Go to the search view with a language prefix and click on one of the + // facets. $this->drupalGet('xx-lolspeak/search-api-test-fulltext'); - $this->clickLink('item'); + // Check that the language code is still in the url. $this->assertTrue(strpos($this->getUrl(), 'xx-lolspeak/'), 'Found the language code in the url'); }