Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
project
drupal
Commits
d017695d
Commit
d017695d
authored
Jan 25, 2014
by
alexpott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#2176831
by chx: CustomBlockSaveTest is not saving body.
parent
9279766c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
core/modules/block/custom_block/lib/Drupal/custom_block/Tests/CustomBlockSaveTest.php
...ock/lib/Drupal/custom_block/Tests/CustomBlockSaveTest.php
+4
-3
No files found.
core/modules/block/custom_block/lib/Drupal/custom_block/Tests/CustomBlockSaveTest.php
View file @
d017695d
...
...
@@ -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'
]);
}
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment