@@ -12,10 +12,10 @@ abstract class AbstractIntegrationTest extends TestCase
12
12
/**
13
13
* @var string
14
14
*/
15
- const DEFAULT_INTEGRATION_ENDPOINT = 'http://localhost:%d ' ;
15
+ public const DEFAULT_INTEGRATION_ENDPOINT = 'http://localhost:%d ' ;
16
16
17
- const DATE_PATTERN = '/^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}\:[0-9]{2}\:[0-9]{2}\+[0-9]{2}\:[0-9]{2}$/ ' ;
18
- const UUID_PATTERN = '/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/ ' ;
17
+ public const DATE_PATTERN = '/^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}\:[0-9]{2}\:[0-9]{2}\+[0-9]{2}\:[0-9]{2}$/ ' ;
18
+ public const UUID_PATTERN = '/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/ ' ;
19
19
20
20
/**
21
21
* @var resource
@@ -25,7 +25,7 @@ abstract class AbstractIntegrationTest extends TestCase
25
25
/**
26
26
* @throws \RuntimeException
27
27
*/
28
- protected function httpRequest (string $ method , string $ resource , array $ headers = [], string $ body = null ): array
28
+ protected function httpRequest (string $ method , string $ resource , array $ headers = [], ? string $ body = null ): array
29
29
{
30
30
$ curlHeaders = [];
31
31
foreach ($ headers as $ key => $ value ) {
@@ -45,6 +45,7 @@ protected function httpRequest(string $method, string $resource, array $headers
45
45
if (false === $ rawResponse ) {
46
46
$ info = curl_getinfo ($ this ->curl );
47
47
$ error = curl_error ($ this ->curl );
48
+
48
49
throw new \RuntimeException ('Invalid response from server! ' .print_r ($ info , true ).PHP_EOL .$ error );
49
50
}
50
51
@@ -104,7 +105,7 @@ private function geHttpHeaders(array $headerRows): array
104
105
continue ;
105
106
}
106
107
107
- $ key = strtolower (trim (substr ($ headerRow , 0 , $ pos )));
108
+ $ key = mb_strtolower (trim (substr ($ headerRow , 0 , $ pos )));
108
109
$ value = trim (substr ($ headerRow , $ pos + 1 ));
109
110
110
111
if ('' === $ value ) {
0 commit comments