update
This commit is contained in:
@@ -11,14 +11,13 @@ use Drupal\block_content\BlockContentTypeInterface;
|
||||
* @ConfigEntityType(
|
||||
* id = "block_content_type",
|
||||
* label = @Translation("Custom block type"),
|
||||
* label_collection = @Translation("Custom block types"),
|
||||
* label_collection = @Translation("Custom block library"),
|
||||
* label_singular = @Translation("custom block type"),
|
||||
* label_plural = @Translation("custom block types"),
|
||||
* label_count = @PluralTranslation(
|
||||
* singular = "@count custom block type",
|
||||
* plural = "@count custom block types",
|
||||
* ),
|
||||
* label_collection = @Translation("Custom block library"),
|
||||
* handlers = {
|
||||
* "form" = {
|
||||
* "default" = "Drupal\block_content\BlockContentTypeForm",
|
||||
|
||||
@@ -31,7 +31,10 @@ class BlockContentListTest extends BlockContentTestBase {
|
||||
* Tests the custom block listing page.
|
||||
*/
|
||||
public function testListing() {
|
||||
$this->drupalLogin($this->drupalCreateUser(['administer blocks', 'translate configuration']));
|
||||
$this->drupalLogin($this->drupalCreateUser([
|
||||
'administer blocks',
|
||||
'translate configuration',
|
||||
]));
|
||||
$this->drupalGet('admin/structure/block/block-content');
|
||||
|
||||
// Test for the page title.
|
||||
@@ -55,7 +58,7 @@ class BlockContentListTest extends BlockContentTestBase {
|
||||
$new_label = 'Albatross';
|
||||
// Add a new entity using the operations link.
|
||||
$link_text = t('Add custom block');
|
||||
$this->assertLink($link_text);
|
||||
$this->assertSession()->linkExists($link_text);
|
||||
$this->clickLink($link_text);
|
||||
$this->assertSession()->statusCodeEquals(200);
|
||||
$edit = [];
|
||||
|
||||
@@ -34,7 +34,10 @@ class BlockContentListViewsTest extends BlockContentTestBase {
|
||||
* Tests the custom block listing page.
|
||||
*/
|
||||
public function testListing() {
|
||||
$this->drupalLogin($this->drupalCreateUser(['administer blocks', 'translate configuration']));
|
||||
$this->drupalLogin($this->drupalCreateUser([
|
||||
'administer blocks',
|
||||
'translate configuration',
|
||||
]));
|
||||
$this->drupalGet('admin/structure/block/block-content');
|
||||
|
||||
// Test for the page title.
|
||||
@@ -67,7 +70,7 @@ class BlockContentListViewsTest extends BlockContentTestBase {
|
||||
$new_label = 'Albatross';
|
||||
// Add a new entity using the operations link.
|
||||
$link_text = t('Add custom block');
|
||||
$this->assertLink($link_text);
|
||||
$this->assertSession()->linkExists($link_text);
|
||||
$this->clickLink($link_text);
|
||||
$this->assertSession()->statusCodeEquals(200);
|
||||
$edit = [];
|
||||
@@ -123,7 +126,7 @@ class BlockContentListViewsTest extends BlockContentTestBase {
|
||||
|
||||
// Confirm that the empty text is displayed.
|
||||
$this->assertText('There are no custom blocks available.');
|
||||
$this->assertLink('custom block');
|
||||
$this->assertSession()->linkExists('custom block');
|
||||
|
||||
$block_content = BlockContent::create([
|
||||
'info' => 'Non-reusable block',
|
||||
|
||||
Reference in New Issue
Block a user