/** * Tests the fillContextBackreferences() method * * @return void */ public function testFillContextBackreferences() { // Get the objects we need $rewriteModule = new MockRewriteModule(); $request = new HttpRequest(); $response = new HttpResponse(); $mockRequestContext = new MockRequestContext(); $mockRequestContext->setServerVar(ServerVars::DOCUMENT_ROOT, $this->documentRoot); // Do the thing $mockRequestContext->setEnvVar(EnvVars::HTTPS, 'test'); $rewriteModule->setRequestContext($mockRequestContext); $rewriteModule->fillContextBackreferences(); $this->assertEquals('test', $rewriteModule->getServerBackreferences()['$' . EnvVars::HTTPS]); }