Commit 9d37ef53 authored by webchick's avatar webchick

Issue #1824244 follow-up by csg: Tests for: Turn _field_ui_bundle_admin_path()...

Issue #1824244 follow-up by csg: Tests for: Turn _field_ui_bundle_admin_path() into a public function (field_ui_bundle_admin_path()).
parent ce051755
......@@ -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(
......@@ -76,6 +76,27 @@ function testTranslateLinkContentAdminPage() {
$this->assertNoLinkByHref('node/' . $page->nid . '/translations');
}
/**
* 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().
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment