protected function RabbitHolePageRedirectActionTest::createTestNode in Rabbit Hole 8
Same name and namespace in other branches
- 2.x tests/src/Functional/RabbitHolePageRedirectActionTest.php \Drupal\Tests\rabbit_hole\Functional\RabbitHolePageRedirectActionTest::createTestNode()
Creates test node with provided action.
Return value
\Drupal\node\NodeInterface Test node object.
4 calls to RabbitHolePageRedirectActionTest::createTestNode()
- RabbitHolePageRedirectActionTest::assertPageRedirect in tests/
src/ Functional/ RabbitHolePageRedirectActionTest.php - Test URL redirects (destination and redirect code).
- RabbitHolePageRedirectActionTest::testRedirectCodes in tests/
src/ Functional/ RabbitHolePageRedirectActionTest.php - Tests available redirect codes.
- RabbitHolePageRedirectActionTest::testRedirectPaths in tests/
src/ Functional/ RabbitHolePageRedirectActionTest.php - Test available URL patterns.
- RabbitHolePageRedirectActionTest::testTokenizedUrlRedirect in tests/
src/ Functional/ RabbitHolePageRedirectActionTest.php - Test URL redirect with token value.
File
- tests/
src/ Functional/ RabbitHolePageRedirectActionTest.php, line 228
Class
- RabbitHolePageRedirectActionTest
- Test the "Page redirect" action.
Namespace
Drupal\Tests\rabbit_hole\FunctionalCode
protected function createTestNode($action = NULL) {
$values = [
'type' => 'article',
];
if (isset($action)) {
$values['rh_action'] = $action;
}
return $this
->drupalCreateNode($values);
}