protected function assertIsValidHashValue($actualHash, $keyChain = array())
{
switch ($actualHashType = gettype($actualHash)) {
case 'boolean':
case 'integer':
case 'double':
case 'string':
case 'NULL':
// All valid, just return
return;
case 'array':
foreach ($actualHash as $key => $childHash) {
$this->assertIsValidHashValue($childHash, array_merge($keyChain, array($key)));
}
return;
case 'resource':
case 'object':
$this->fail(sprintf('Value for $hash[%s] is of invalid type "%s".', implode('][', $keyChain), $actualHashType));
}
}