Commit 40245a6b authored by jhodgdon's avatar jhodgdon
Browse files

Issue #1797220 by Lars Toomre: Remove t() from test assertions in Entity sub-system

parent dd5d0f61
...@@ -51,7 +51,7 @@ function testFormCRUD() { ...@@ -51,7 +51,7 @@ function testFormCRUD() {
$this->drupalPost('entity-test/add', $edit, t('Save')); $this->drupalPost('entity-test/add', $edit, t('Save'));
$entity = $this->loadEntityByName($name1); $entity = $this->loadEntityByName($name1);
$this->assertTrue($entity, t('Entity found in the database.')); $this->assertTrue($entity, 'Entity found in the database.');
$edit['name'] = $name2; $edit['name'] = $name2;
$this->drupalPost('entity-test/manage/' . $entity->id() . '/edit', $edit, t('Save')); $this->drupalPost('entity-test/manage/' . $entity->id() . '/edit', $edit, t('Save'));
...@@ -63,7 +63,7 @@ function testFormCRUD() { ...@@ -63,7 +63,7 @@ function testFormCRUD() {
$this->drupalPost('entity-test/manage/' . $entity->id() . '/edit', array(), t('Delete')); $this->drupalPost('entity-test/manage/' . $entity->id() . '/edit', array(), t('Delete'));
$entity = $this->loadEntityByName($name2); $entity = $this->loadEntityByName($name2);
$this->assertFalse($entity, t('Entity not found in the database.')); $this->assertFalse($entity, 'Entity not found in the database.');
} }
/** /**
......
...@@ -88,7 +88,7 @@ function testEntityFormLanguage() { ...@@ -88,7 +88,7 @@ function testEntityFormLanguage() {
$this->drupalGet('admin/structure/types/manage/page'); $this->drupalGet('admin/structure/types/manage/page');
$edit = array('node_type_language_hidden' => FALSE, 'node_type_language_default' => LANGUAGE_NOT_SPECIFIED); $edit = array('node_type_language_hidden' => FALSE, 'node_type_language_default' => LANGUAGE_NOT_SPECIFIED);
$this->drupalPost('admin/structure/types/manage/page', $edit, t('Save content type')); $this->drupalPost('admin/structure/types/manage/page', $edit, t('Save content type'));
$this->assertRaw(t('The content type %type has been updated.', array('%type' => 'Basic page')), t('Basic page content type has been updated.')); $this->assertRaw(t('The content type %type has been updated.', array('%type' => 'Basic page')), 'Basic page content type has been updated.');
// Create a node with language. // Create a node with language.
$edit = array(); $edit = array();
...@@ -98,18 +98,18 @@ function testEntityFormLanguage() { ...@@ -98,18 +98,18 @@ function testEntityFormLanguage() {
$edit["body[$field_langcode][0][value]"] = $this->randomName(16); $edit["body[$field_langcode][0][value]"] = $this->randomName(16);
$edit['langcode'] = $langcode; $edit['langcode'] = $langcode;
$this->drupalPost('node/add/page', $edit, t('Save')); $this->drupalPost('node/add/page', $edit, t('Save'));
$this->assertRaw(t('Basic page %title has been created.', array('%title' => $edit["title"])), t('Basic page created.')); $this->assertRaw(t('Basic page %title has been created.', array('%title' => $edit["title"])), 'Basic page created.');
// Check to make sure the node was created. // Check to make sure the node was created.
$node = $this->drupalGetNodeByTitle($edit["title"]); $node = $this->drupalGetNodeByTitle($edit["title"]);
$this->assertTrue($node, t('Node found in database.')); $this->assertTrue($node, 'Node found in database.');
// Make body translatable. // Make body translatable.
$field = field_info_field('body'); $field = field_info_field('body');
$field['translatable'] = TRUE; $field['translatable'] = TRUE;
field_update_field($field); field_update_field($field);
$field = field_info_field('body'); $field = field_info_field('body');
$this->assertTrue($field['translatable'], "Field body is translatable."); $this->assertTrue($field['translatable'], 'Field body is translatable.');
// Create a body translation and check the form language. // Create a body translation and check the form language.
$langcode2 = $this->langcodes[1]; $langcode2 = $this->langcodes[1];
......
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