Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: thgs <theogpl57@gmail.com>
  • Loading branch information
thgs committed Dec 18, 2023
1 parent 38d4a5f commit 929f0b5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@
/laminas-mkdoc-theme/
/phpunit.xml
/vendor/

.idea
2 changes: 2 additions & 0 deletions test/Reader/Http/LaminasHttpClientDecoratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,8 @@ public static function invalidHeaders(): iterable
foreach ($invalidIndividualValues as $key => $value) {
yield $key => [['X-Test' => [$value]], 'strings or numbers'];
}

// todo: expand here with multi values.
}

/**
Expand Down
8 changes: 7 additions & 1 deletion test/Reader/Http/ResponseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ public function testConstructorCanAcceptHeaders(): void
'Location' => 'http://example.org/foo',
'Content-Length' => 1234,
'X-Content-Length' => 1234.56,
'MultiValue' => ['one', 'two']
'MultiValue' => ['one', 'two'],
'MultiValue2' => [1, 2],

]);

Check failure on line 49 in test/Reader/Http/ResponseTest.php

View workflow job for this annotation

GitHub Actions / ci / QA Checks (PHPCodeSniffer [8.1, locked], ubuntu-latest, laminas/laminas-continuous-integration-ac...

Blank line found at the end of the array
$this->assertEquals(204, $response->getStatusCode());
Expand Down Expand Up @@ -170,6 +171,11 @@ public static function invalidHeaders(): array
['X-Test' => [(object) ['body' => 'BODY']]],
'must be a string or numeric',
],
// todo: expand this with more combinations?
'mixed-values-in-array' => [
['X-Test' => ['valid', false]],
'must be a string or numeric',
]

Check failure on line 178 in test/Reader/Http/ResponseTest.php

View workflow job for this annotation

GitHub Actions / ci / QA Checks (PHPCodeSniffer [8.1, locked], ubuntu-latest, laminas/laminas-continuous-integration-ac...

Multi-line arrays must have a trailing comma after the last element
];
}

Expand Down

0 comments on commit 929f0b5

Please sign in to comment.