comparison core/modules/block_content/src/Tests/BlockContentTestBase.php @ 17:129ea1e6d783

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:21:36 +0000
parents 7a779792577d
children af1871eacc83
comparison
equal deleted inserted replaced
16:c2387f117808 17:129ea1e6d783
32 * Permissions to grant admin user. 32 * Permissions to grant admin user.
33 * 33 *
34 * @var array 34 * @var array
35 */ 35 */
36 protected $permissions = [ 36 protected $permissions = [
37 'administer blocks' 37 'administer blocks',
38 ]; 38 ];
39 39
40 /** 40 /**
41 * Modules to enable. 41 * Modules to enable.
42 * 42 *
81 protected function createBlockContent($title = FALSE, $bundle = 'basic', $save = TRUE) { 81 protected function createBlockContent($title = FALSE, $bundle = 'basic', $save = TRUE) {
82 $title = $title ?: $this->randomMachineName(); 82 $title = $title ?: $this->randomMachineName();
83 $block_content = BlockContent::create([ 83 $block_content = BlockContent::create([
84 'info' => $title, 84 'info' => $title,
85 'type' => $bundle, 85 'type' => $bundle,
86 'langcode' => 'en' 86 'langcode' => 'en',
87 ]); 87 ]);
88 if ($block_content && $save === TRUE) { 88 if ($block_content && $save === TRUE) {
89 $block_content->save(); 89 $block_content->save();
90 } 90 }
91 return $block_content; 91 return $block_content;