Tests entity_get_display().
public function testEntityGetDisplay() {
// Check that entity_get_display() returns a fresh object when no
// configuration entry exists.
$display = entity_get_display('entity_test', 'entity_test', 'default');
$this
->assertTrue($display
->isNew());
// Add some components and save the display.
$display
->setComponent('component_1', array(
'weight' => 10,
))
->save();
// Check that entity_get_display() returns the correct object.
$display = entity_get_display('entity_test', 'entity_test', 'default');
$this
->assertFalse($display
->isNew());
$this
->assertEqual($display->id, 'entity_test.entity_test.default');
$this
->assertEqual($display
->getComponent('component_1'), array(
'weight' => 10,
));
}