X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fmodules%2Fcontrib%2Fmetatag%2Ftests%2Fsrc%2FFunctional%2FNodeTranslation.php;fp=web%2Fmodules%2Fcontrib%2Fmetatag%2Ftests%2Fsrc%2FFunctional%2FNodeTranslation.php;h=91b444379be19b5197ef64ae76aad05e26a38183;hp=0000000000000000000000000000000000000000;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0 diff --git a/web/modules/contrib/metatag/tests/src/Functional/NodeTranslation.php b/web/modules/contrib/metatag/tests/src/Functional/NodeTranslation.php new file mode 100644 index 000000000..91b444379 --- /dev/null +++ b/web/modules/contrib/metatag/tests/src/Functional/NodeTranslation.php @@ -0,0 +1,76 @@ +loginUser1(); + + // Add language. + $this->drupalGet('/admin/config/regional/language/add'); + $this->assertResponse(200); + $edit = [ + 'predefined_langcode' => 'hu', + ]; + $this->drupalPostForm(NULL, $edit, 'Add language'); + + // Set up a content type. + $this->drupalCreateContentType(['type' => 'article']); + $this->drupalGet('/admin/structure/types/manage/article'); + $this->assertResponse(200); + $edit = [ + 'language_configuration[content_translation]' => TRUE, + ]; + $this->drupalPostForm(NULL, $edit, 'Save content type'); + } + + /** + * Load the custom route, make sure something is output. + */ + public function testContentTranslationForm() { + $this->drupalGet('/admin/config/regional/content-language'); + $this->assertResponse(200); + $this->assertText('Content language'); + $this->drupalPostForm(NULL, [], 'Save configuration'); + $this->assertResponse(200); + $this->assertText('Settings successfully updated.'); + } + +}