From 96755fb0158a2cf4caa5011c87b8e3260cf4b70f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Pij=C3=A1k?= '$excepted'
must be same as '$actual'
";
+ $error = error_get_last(); $error_message = '';
+
+ if ($error !== null)
+ {
+ $error_message = $error['message'];
+ }
+
+ return ($optional ? ("OPTIONAL") : ("FAIL")) . " $description - Required: '$excepted'
must be same as Actual: '$actual'
ERROR: $error_message
";
}
}
?>
@@ -91,6 +98,7 @@ function same($excepted, $actual, $description, $optional = false)
= same('BulkGate Encode', json_decode('"BulkGate Encode"'), 'JSON decode') ?>
= same(true, function_exists('apache_request_headers'), 'Function: apache_request_headers', true) ?>
= same(true, function_exists('array_change_key_case'), 'Function: array_change_key_case') ?>
+ = same('{"message":"BulkGate API"}', file_get_contents('https://portal.bulkgate.com/api/welcome'), 'Portal connection ') ?>