Commit d017695d authored by alexpott's avatar alexpott

Issue #2176831 by chx: CustomBlockSaveTest is not saving body.

parent 9279766c
......@@ -49,13 +49,13 @@ public function testImport() {
$max_id = db_query('SELECT MAX(id) FROM {custom_block}')->fetchField();
$test_id = $max_id + mt_rand(1000, 1000000);
$info = $this->randomName(8);
$block = array(
$block_array = array(
'info' => $info,
'body' => array(Language::LANGCODE_NOT_SPECIFIED => array(array('value' => $this->randomName(32)))),
'body' => array('value' => $this->randomName(32)),
'type' => 'basic',
'id' => $test_id
);
$block = entity_create('custom_block', $block);
$block = entity_create('custom_block', $block_array);
$block->enforceIsNew(TRUE);
$block->save();
......@@ -65,6 +65,7 @@ public function testImport() {
// Test the import saved.
$block_by_id = custom_block_load($test_id);
$this->assertTrue($block_by_id, 'Custom block load by block ID.');
$this->assertIdentical($block_by_id->body->value, $block_array['body']['value']);
}
/**
......
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