Created
January 4, 2017 22:29
-
-
Save DCzajkowski/855859a40c11590f2073eca52b039e13 to your computer and use it in GitHub Desktop.
Foreach in a test. Ugh :/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
$response->headers->all() = [ | |
'test' => ['test-value'], | |
'Content-Type' => ['application/json'], | |
]; | |
*/ | |
$found = false; | |
foreach ($response->headers->all() as $key => $value) { | |
if ($key === 'test' && $value[0] === 'test-value') { | |
$found = true; | |
} | |
} | |
$this->assertTrue($found); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment