{inheritdoc}
Overrides FieldTestBase::assertFieldValues
function assertFieldValues(EntityInterface $entity, $field_name, $langcode, $expected_values, $column = 'value') {
// Override the base implementation with one that works with the old
// entity API.
// @todo: Remove this when replacing the remaining of test_entity with
// entity_test.
$e = clone $entity;
field_attach_load('test_entity', array(
$e->ftid => $e,
));
$values = isset($e->{$field_name}[$langcode]) ? $e->{$field_name}[$langcode] : array();
$this
->assertEqual(count($values), count($expected_values), 'Expected number of values were saved.');
foreach ($expected_values as $key => $value) {
$this
->assertEqual($values[$key][$column], $value, format_string('Value @value was saved correctly.', array(
'@value' => $value,
)));
}
}