summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwebchick2012-12-01 20:51:31 (GMT)
committerwebchick2012-12-01 20:51:31 (GMT)
commit9d37ef53195763b82cf467c4ba559155ef647b32 (patch)
tree7009828249315e21f3d294ccd16f4c0ad726e657
parentce0517557698c41aa3a26ca22e6002b11b3fc653 (diff)
Issue #1824244 follow-up by csg: Tests for: Turn _field_ui_bundle_admin_path() into a public function (field_ui_bundle_admin_path()).
-rw-r--r--core/modules/node/lib/Drupal/node/Tests/NodeTranslationUITest.php23
1 files changed, 22 insertions, 1 deletions
diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeTranslationUITest.php b/core/modules/node/lib/Drupal/node/Tests/NodeTranslationUITest.php
index 8cd5b49..ccdbf9c 100644
--- a/core/modules/node/lib/Drupal/node/Tests/NodeTranslationUITest.php
+++ b/core/modules/node/lib/Drupal/node/Tests/NodeTranslationUITest.php
@@ -24,7 +24,7 @@ class NodeTranslationUITest extends EntityTranslationUITest {
*
* @var array
*/
- public static $modules = array('language', 'translation_entity', 'node');
+ public static $modules = array('language', 'translation_entity', 'node', 'field_ui');
public static function getInfo() {
return array(
@@ -77,6 +77,27 @@ class NodeTranslationUITest extends EntityTranslationUITest {
}
/**
+ * Tests field translation form.
+ */
+ function testFieldTranslationForm() {
+ $admin_user = $this->drupalCreateUser(array('translate any entity', 'access administration pages', 'bypass node access'));
+ $this->drupalLogin($admin_user);
+
+ $article = $this->drupalCreateNode(array('type' => 'article', 'langcode' => 'en'));
+
+ // Visit translation page.
+ $this->drupalGet('node/' . $article->nid . '/translations');
+ $this->assertRaw('Not translated');
+
+ // Delete the only translatable field.
+ field_delete_field('field_test_et_ui_test');
+
+ // Visit translation page.
+ $this->drupalGet('node/' . $article->nid . '/translations');
+ $this->assertRaw('no translatable fields');
+ }
+
+ /**
* Overrides \Drupal\translation_entity\Tests\EntityTranslationUITest::getNewEntityValues().
*/
protected function getNewEntityValues($langcode) {