public function ReverseProxyMiddlewareTest::testReverseProxyEnabled in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/tests/Drupal/Tests/Core/StackMiddleware/ReverseProxyMiddlewareTest.php \Drupal\Tests\Core\StackMiddleware\ReverseProxyMiddlewareTest::testReverseProxyEnabled()
Tests that subscriber sets trusted headers when reverse proxy is set.
@dataProvider reverseProxyEnabledProvider
File
- core/
tests/ Drupal/ Tests/ Core/ StackMiddleware/ ReverseProxyMiddlewareTest.php, line 56 - Contains \Drupal\Tests\Core\StackMiddleware\ReverseProxyMiddlewareTest.
Class
- ReverseProxyMiddlewareTest
- Unit test the reverse proxy stack middleware.
Namespace
Drupal\Tests\Core\StackMiddlewareCode
public function testReverseProxyEnabled($provided_settings) {
// Enable reverse proxy and add test values.
$settings = new Settings(array(
'reverse_proxy' => 1,
) + $provided_settings);
$this
->trustedHeadersAreSet($settings);
}