Issue #2176831 by chx: CustomBlockSaveTest is not saving body.
parent
9279766c01
commit
d017695d0e
|
@ -49,13 +49,13 @@ class CustomBlockSaveTest extends CustomBlockTestBase {
|
|||
$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 @@ class CustomBlockSaveTest extends CustomBlockTestBase {
|
|||
// 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']);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue