Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3b3d590

Browse files
committed
Add test case
1 parent e4b7969 commit 3b3d590

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/Symfony/Component/HttpKernel/Tests/Fragment/InlineFragmentRendererTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,15 @@ public function testHeadersPossiblyResultingIn304AreNotAssignedToSubrequest()
204204
$strategy->render('/', $request);
205205
}
206206

207+
public function testLocalhostIsInTrustedProxies()
208+
{
209+
$strategy = new InlineFragmentRenderer($this->getKernel($this->returnValue(new Response())));
210+
$request = Request::create('/');
211+
$strategy->render('/', $request);
212+
213+
$this->assertTrue(in_array('127.0.0.1', Request::getTrustedProxies()));
214+
}
215+
207216
/**
208217
* Creates a Kernel expecting a request equals to $request
209218
* Allows delta in comparison in case REQUEST_TIME changed by 1 second.

0 commit comments

Comments
 (0)