Skip to content

Commit

Permalink
Fix redirect loop tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
jhedstrom committed Jul 20, 2015
1 parent 7566efd commit 5d2002f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Tests/RedirectAPITest.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,9 @@ public function testRedirectEntity() {
}

// Test passthrough_querystring.
$redirect = $this->controller->create();
$redirect->setSource('a-different-url');
$redirect->setRedirect('node');
$redirect->save();
$redirect = $repository->findMatchingRedirect('a-different-url', ['key1' => 'val1'], 'de');
if (!empty($redirect)) {
Expand All @@ -118,6 +120,7 @@ public function testRedirectEntity() {
/** @var \Drupal\redirect\Entity\Redirect $new_redirect */
$new_redirect = $this->controller->create();
$new_redirect->setSource('a-different-url', ['foo' => 'bar']);
$new_redirect->setRedirect('node');
$new_redirect->save();
$found = $repository->findMatchingRedirect('a-different-url', ['foo' => 'bar'], 'de');
if (!empty($found)) {
Expand All @@ -131,6 +134,7 @@ public function testRedirectEntity() {
/** @var \Drupal\redirect\Entity\Redirect $redirect */
$redirect = $this->controller->create();
$redirect->setSource('Case-Sensitive-Path');
$redirect->setRedirect('node');
$redirect->save();
$found = $repository->findBySourcePath('case-sensitive-path');
if (!empty($found)) {
Expand Down

0 comments on commit 5d2002f

Please sign in to comment.