private function RestrictIpAccessTest::createArticle in Restrict IP 3.x
Same name and namespace in other branches
- 8.2 tests/src/Functional/RestrictIpAccessTest.php \Drupal\Tests\restrict_ip\Functional\RestrictIpAccessTest::createArticle()
- 8 tests/src/Functional/RestrictIpAccessTest.php \Drupal\Tests\restrict_ip\Functional\RestrictIpAccessTest::createArticle()
4 calls to RestrictIpAccessTest::createArticle()
- RestrictIpAccessTest::testAccessBypassByRole in tests/
src/ Functional/ RestrictIpAccessTest.php - RestrictIpAccessTest::testBlacklistedPaths in tests/
src/ Functional/ RestrictIpAccessTest.php - RestrictIpAccessTest::testRedirectToLoginWhenBypassByRoleEnabled in tests/
src/ Functional/ RestrictIpAccessTest.php - RestrictIpAccessTest::testWhitelistedPaths in tests/
src/ Functional/ RestrictIpAccessTest.php
File
- tests/
src/ Functional/ RestrictIpAccessTest.php, line 184
Class
- RestrictIpAccessTest
- @group restrict_ip
Namespace
Drupal\Tests\restrict_ip\FunctionalCode
private function createArticle() {
static $counter;
if (!$counter) {
$counter = 1;
}
$node = $this->container
->get('entity_type.manager')
->getStorage('node')
->create([
'type' => 'article',
'title' => 'Article ' . $counter,
]);
$node
->save();
$this->container
->get('router.builder')
->rebuild();
$counter += 1;
}