Skip to content

Commit

Permalink
Merge branch '1.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
barw4 committed Jan 20, 2021
2 parents 0932b8e + d59089d commit dd0edc9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function onKernelRequestIndex(RequestEvent $event)
if ($indexPage !== null) {
$indexPage = '/' . ltrim($indexPage, '/');
$request->attributes->set('semanticPathinfo', $indexPage);
$request->attributes->set('needsForward', true);
$request->attributes->set('needsRedirect', true);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public function testOnKernelRequestIndexOnIndexPage($requestPath, $configuredInd
$this->request->attributes->set('semanticPathinfo', $requestPath);
$this->indexRequestEventListener->onKernelRequestIndex($this->event);
$this->assertEquals($expectedIndexPath, $this->request->attributes->get('semanticPathinfo'));
$this->assertTrue($this->request->attributes->get('needsForward'));
$this->assertTrue($this->request->attributes->get('needsRedirect'));
}

public function indexPageProvider()
Expand All @@ -97,6 +97,6 @@ public function testOnKernelRequestIndexNotOnIndexPage()
{
$this->request->attributes->set('semanticPathinfo', '/anyContent');
$this->indexRequestEventListener->onKernelRequestIndex($this->event);
$this->assertFalse($this->request->attributes->has('needsForward'));
$this->assertFalse($this->request->attributes->has('needsRedirect'));
}
}

0 comments on commit dd0edc9

Please sign in to comment.