From 88614e9bb87a897cc6b4524b90538c58c7597403 Mon Sep 17 00:00:00 2001 From: silaskenneth Date: Sat, 21 Jan 2023 09:45:54 +0300 Subject: [PATCH] Update tests to reflect the change. --- .../Writers/Php/CodeMethodWriterTests.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/Kiota.Builder.Tests/Writers/Php/CodeMethodWriterTests.cs b/tests/Kiota.Builder.Tests/Writers/Php/CodeMethodWriterTests.cs index 165469aff5..e9999d8421 100644 --- a/tests/Kiota.Builder.Tests/Writers/Php/CodeMethodWriterTests.cs +++ b/tests/Kiota.Builder.Tests/Writers/Php/CodeMethodWriterTests.cs @@ -388,7 +388,7 @@ public void WriteRequestGeneratorForParsable() result); Assert.Contains("if ($requestConfiguration !== null", result); Assert.Contains("if ($requestConfiguration->h !== null)", result); - Assert.Contains("$requestInfo->headers->putAll($requestInfo->headers);", result); + Assert.Contains("$requestInfo->headers->putAll($requestConfiguration->h->getAll());", result); Assert.Contains("$requestInfo->setQueryParameters($requestConfiguration->q);", result); Assert.Contains("$requestInfo->addRequestOptions(...$requestConfiguration->o);", result); Assert.Contains("$requestInfo->setContentFromParsable($this->requestAdapter, \"\", $body);", result); @@ -415,7 +415,7 @@ public void WritesRequestGeneratorBodyForParsableCollection() result); Assert.Contains("if ($requestConfiguration !== null", result); Assert.Contains("if ($requestConfiguration->h !== null)", result); - Assert.Contains("$requestInfo->headers->putAll($requestInfo->headers);", result); + Assert.Contains("$requestInfo->headers->putAll($requestConfiguration->h->getAll());", result); Assert.Contains("$requestInfo->setQueryParameters($requestConfiguration->q);", result); Assert.Contains("$requestInfo->addRequestOptions(...$requestConfiguration->o);", result); Assert.Contains("$requestInfo->setContentFromParsableCollection($this->requestAdapter, \"\", $body);", result); @@ -441,7 +441,7 @@ public void WriteRequestGeneratorForScalarType() result); Assert.Contains("if ($requestConfiguration !== null", result); Assert.Contains("if ($requestConfiguration->h !== null)", result); - Assert.Contains("$requestInfo->headers->putAll($requestInfo->headers);", result); + Assert.Contains("$requestInfo->headers->putAll($requestConfiguration->h->getAll());", result); Assert.Contains("$requestInfo->setQueryParameters($requestConfiguration->q);", result); Assert.Contains("$requestInfo->addRequestOptions(...$requestConfiguration->o);", result); Assert.Contains("$requestInfo->setContentFromScalar($this->requestAdapter, \"\", $body);", result); @@ -472,7 +472,7 @@ public void WritesRequestGeneratorBodyForScalarCollection() result); Assert.Contains("if ($requestConfiguration !== null", result); Assert.Contains("if ($requestConfiguration->h !== null)", result); - Assert.Contains("$requestInfo->headers->putAll($requestInfo->headers);", result); + Assert.Contains("$requestInfo->headers->putAll($requestConfiguration->h->getAll());", result); Assert.Contains("$requestInfo->setQueryParameters($requestConfiguration->q);", result); Assert.Contains("$requestInfo->addRequestOptions(...$requestConfiguration->o);", result); Assert.Contains("$requestInfo->setContentFromScalarCollection($this->requestAdapter, \"\", $body);", result);