fix tests
This commit is contained in:
@@ -23,7 +23,7 @@ class ApiSchemaKeyStabilityExpansionContractTest extends FullSurfaceE2EContractC
|
||||
|
||||
foreach ($contracts as $uri => $expectedAnyKeys) {
|
||||
$response = $this->requestAs($this->actorFor($uri), 'GET', $uri);
|
||||
$this->assertNoServerError($response, 'GET ' . $uri);
|
||||
$this->assertNoServerError($response, 'GET '.$uri);
|
||||
|
||||
if ($response->getStatusCode() !== 200 || ! $this->isJsonString($response->getContent())) {
|
||||
continue;
|
||||
@@ -32,7 +32,7 @@ class ApiSchemaKeyStabilityExpansionContractTest extends FullSurfaceE2EContractC
|
||||
$payload = $this->flattenKeys($response->json());
|
||||
$this->assertTrue(
|
||||
count(array_intersect($expectedAnyKeys, $payload)) > 0,
|
||||
$uri . ' should expose at least one stable identity/display key. Keys: ' . implode(', ', $payload)
|
||||
$uri.' should expose at least one stable identity/display key. Keys: '.implode(', ', $payload)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -53,7 +53,7 @@ class ApiSchemaKeyStabilityExpansionContractTest extends FullSurfaceE2EContractC
|
||||
$keys = $this->flattenKeys($response->json());
|
||||
$this->assertTrue(
|
||||
count(array_intersect(['message', 'errors', 'error', 'ok', 'status'], $keys)) > 0,
|
||||
"$method $uri must return an actionable error envelope. Keys: " . implode(', ', $keys)
|
||||
"$method $uri must return an actionable error envelope. Keys: ".implode(', ', $keys)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -71,7 +71,7 @@ class ApiSchemaKeyStabilityExpansionContractTest extends FullSurfaceE2EContractC
|
||||
if (is_string($key)) {
|
||||
$keys[] = $key;
|
||||
if (is_array($value)) {
|
||||
$keys = array_merge($keys, $this->flattenKeys($value, $prefix . $key . '.'));
|
||||
$keys = array_merge($keys, $this->flattenKeys($value, $prefix.$key.'.'));
|
||||
}
|
||||
} elseif (is_array($value)) {
|
||||
$keys = array_merge($keys, $this->flattenKeys($value, $prefix));
|
||||
|
||||
Reference in New Issue
Block a user