GIF89a; %PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
Server IP : 134.29.175.74 / Your IP : 216.73.216.160 Web Server : nginx/1.10.2 System : Windows NT CST-WEBSERVER 10.0 build 19045 (Windows 10) i586 User : Administrator ( 0) PHP Version : 7.1.0 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/nginx/html/Student/JimMartinson/Lab12/drupal/core/modules/block/src/Tests/ |
Upload File : |
<?php namespace Drupal\block\Tests; use Drupal\simpletest\WebTestBase; use Drupal\filter\Entity\FilterFormat; /** * Provides setup and helper methods for block module tests. */ abstract class BlockTestBase extends WebTestBase { /** * Modules to install. * * @var array */ public static $modules = ['block', 'filter', 'test_page_test', 'help', 'block_test']; /** * A list of theme regions to test. * * @var array */ protected $regions; /** * A test user with administrative privileges. * * @var \Drupal\user\UserInterface */ protected $adminUser; protected function setUp() { parent::setUp(); // Use the test page as the front page. $this->config('system.site')->set('page.front', '/test-page')->save(); // Create Full HTML text format. $full_html_format = FilterFormat::create([ 'format' => 'full_html', 'name' => 'Full HTML', ]); $full_html_format->save(); // Create and log in an administrative user having access to the Full HTML // text format. $this->adminUser = $this->drupalCreateUser([ 'administer blocks', $full_html_format->getPermissionName(), 'access administration pages', ]); $this->drupalLogin($this->adminUser); // Define the existing regions. $this->regions = [ 'header', 'sidebar_first', 'content', 'sidebar_second', 'footer', ]; $block_storage = $this->container->get('entity_type.manager')->getStorage('block'); $blocks = $block_storage->loadByProperties(['theme' => $this->config('system.theme')->get('default')]); foreach ($blocks as $block) { $block->delete(); } } }