File "secp256k1_context_randomize_error1.phpt"

Full Path: /home/digidjwy/public_html/wp-content/plugins/mycryptocheckout/vendor/bitwasp/secp256k1-php/secp256k1/tests/secp256k1_context_randomize_error1.phpt
File size: 528 bytes
MIME-type: text/plain
Charset: utf-8

--TEST--
secp256k1_context_randomize returns false if provided the wrong resource type
--SKIPIF--
<?php
if (!extension_loaded("secp256k1")) print "skip extension not loaded";
?>
--FILE--
<?php

set_error_handler(function($code, $str) { echo $str . PHP_EOL; });

$handle = tmpfile();
$result = secp256k1_context_randomize($handle);
echo gettype($result) . PHP_EOL;
echo ($result ? "true" : "false") . PHP_EOL;

?>
--EXPECT--
secp256k1_context_randomize(): supplied resource is not a valid secp256k1_context resource
boolean
false