PanelizerAddDefaultLinkTest.php in Panelizer 8.5
File
tests/src/Functional/PanelizerAddDefaultLinkTest.php
View source
<?php
namespace Drupal\Tests\panelizer\Functional;
use Drupal\Tests\BrowserTestBase;
class PanelizerAddDefaultLinkTest extends BrowserTestBase {
use PanelizerTestTrait;
protected $defaultTheme = 'stark';
protected static $modules = [
'field_ui',
'node',
'panels_ipe',
'panelizer',
];
public function test() {
$assert_session = $this
->assertSession();
$this
->drupalPlaceBlock('local_actions_block', [
'region' => 'content',
'theme' => \Drupal::theme()
->getActiveTheme()
->getName(),
]);
$content_type = 'page';
$this
->loginUser1();
$this
->drupalCreateContentType([
'type' => $content_type,
'name' => 'Page',
]);
$this->container
->get('panelizer')
->setPanelizerSettings('node', 'page', 'default', [
'enable' => TRUE,
'allow' => FALSE,
'custom' => FALSE,
'default' => 'default',
]);
$this
->drupalGet('/admin/structure/types/manage/page/display');
$assert_session
->linkNotExists('Add a new Panelizer default display');
$this
->unpanelize($content_type);
$assert_session
->linkNotExists('Add a new Panelizer default display');
}
}