public function IPBanTestBase::setUp in IP Ban 8
Same name in this branch
- 8 ip_ban.test \IPBanTestBase::setUp()
- 8 src/Tests/IPBanTestBase.php \Drupal\ip_ban\Tests\IPBanTestBase::setUp()
Implement setUp().
Overrides WebTestBase::setUp
2 calls to IPBanTestBase::setUp()
- IPBanFormTest::setUp in src/
Tests/ IPBanFormTest.php - Implement setUp().
- IPBanFunctionalTest::setUp in src/
Tests/ IPBanFunctionalTest.php - Implement setUp().
2 methods override IPBanTestBase::setUp()
- IPBanFormTest::setUp in src/
Tests/ IPBanFormTest.php - Implement setUp().
- IPBanFunctionalTest::setUp in src/
Tests/ IPBanFunctionalTest.php - Implement setUp().
File
- src/
Tests/ IPBanTestBase.php, line 44
Class
- IPBanTestBase
- IP Ban Admin form tests.
Namespace
Drupal\ip_ban\TestsCode
public function setUp() {
parent::setUp();
// Add a content type to create dummy page for testing valid paths and
// proper redirects.
$this->ipBanType = $this
->drupalCreateContentType([
'name' => 'IP Ban Node',
'type' => 'ipban_node',
]);
// Create and log in our privileged user.
$this->adminSitesUser = $this
->drupalCreateUser(array(
'administer site configuration',
// 'access administration pages',
'create ipban_node content',
'edit any ipban_node content',
'access content',
// 'bypass node access',
'administer blocks',
// The admin must have this permission to avoid immediately losing access
// when using a spoofed IP address.
'ignore ip_ban',
));
// $this->drupalLogin($this->adminSitesUser);
}