protected function PathRedirectTestHelper::addRedirect in Path redirect 6
4 calls to PathRedirectTestHelper::addRedirect()
- PathRedirectFunctionalTest::testAutocomplete in ./
path_redirect.test - PathRedirectFunctionalTest::testInactivePurging in ./
path_redirect.test - PathRedirectUnitTest::testRedirectQuerySorting in ./
path_redirect.test - Test the _path_redirect_uasort() callback used in path_redirect_load_by_source().
- PathRedirectUnitTest::testRedirects in ./
path_redirect.test
File
- ./
path_redirect.test, line 55 - Tests for the path_redirect module.
Class
- PathRedirectTestHelper
- @file Tests for the path_redirect module.
Code
protected function addRedirect($source, $redirect, array $options = array()) {
$redirect = array(
'source' => $source,
'redirect' => $redirect,
) + $options;
path_redirect_save($redirect);
return path_redirect_load($redirect['rid']);
}