Chris@0: profile != 'standard') { Chris@0: $this->drupalCreateContentType(['type' => 'article']); Chris@0: } Chris@0: Chris@0: $this->user = $this->drupalCreateUser([ Chris@0: 'administer languages', Chris@0: 'access administration pages', Chris@0: 'view the administration theme', Chris@0: 'administer nodes', Chris@0: 'create article content', Chris@0: 'create url aliases', Chris@0: ]); Chris@0: $this->drupalLogin($this->user); Chris@0: Chris@0: $this->drupalPostForm('admin/config/regional/language/add', ['predefined_langcode' => 'de'], $this->t('Add language')); Chris@0: } Chris@0: Chris@0: /** Chris@0: * @covers ::processInbound Chris@0: */ Chris@0: public function testDomain() { Chris@0: // Check if paths that contain language prefixes can be reached when Chris@0: // language is taken from the domain. Chris@0: $edit = [ Chris@0: 'language_negotiation_url_part' => 'domain', Chris@0: 'prefix[en]' => 'eng', Chris@0: 'prefix[de]' => 'de', Chris@0: 'domain[en]' => $_SERVER['HTTP_HOST'], Chris@0: 'domain[de]' => "de.$_SERVER[HTTP_HOST]", Chris@0: ]; Chris@0: $this->drupalPostForm('admin/config/regional/language/detection/url', $edit, $this->t('Save configuration')); Chris@0: Chris@0: $nodeValues = [ Chris@0: 'title[0][value]' => 'Test', Chris@0: 'path[0][alias]' => '/eng/test', Chris@0: ]; Chris@0: $this->drupalPostForm('node/add/article', $nodeValues, $this->t('Save')); Chris@0: $this->assertSession()->statusCodeEquals(200); Chris@0: } Chris@0: Chris@0: }