Commit e112c456 authored by webchick's avatar webchick

Issue #1798382 by Berdir: Fixed Random Test failures in Entity translation tests.

parent 43942f8a
......@@ -68,7 +68,7 @@ public function setValue($values) {
// Entity is computed out of the ID, so we only need to update the ID. Only
// set the entity field if no ID is given.
if (!empty($values['value'])) {
if (isset($values['value'])) {
else {
......@@ -220,6 +220,16 @@ public function testReadWrite() {
$this->assertEqual($values['name'], array(0 => array('value' => 'bar')), 'Field value has been retrieved via getPropertyValue() from an entity.');
$entity->setPropertyValues(array('name' => 'foo'));
$this->assertEqual($entity->name->value, 'foo', 'Field value has been set via setPropertyValue() on an entity.');
// Make sure the user id can be set to zero.
$user_item[0]['value'] = 0;
$entity = entity_create('entity_test', array(
'name' => $name_item,
'user_id' => $user_item,
'field_test_text' => $text_item,
$this->assertNotNull($entity->user_id->value, 'User id is not NULL');
$this->assertIdentical($entity->user_id->value, 0, 'User id has been set to 0');
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment