1
0
mirror of https://github.com/php/php-src.git synced 2026-04-20 22:41:20 +02:00
Files
archived-php-src/ext/hash/tests/new-context.phpt
=?UTF-8?q?Rouven=20We=C3=9Fling?= b7f59be9f4 Refactor HashContext into an object.
This allows better type hinting as well as potentially adding
methods in a followup diff.

Original patch by Rouven Weßling (github.com/realityking)
Heavily modified by Sara Golemon (github.com/sgolemon)
2017-01-31 19:28:35 -08:00

15 lines
309 B
PHP

--TEST--
Attempt to instantiate a HashContext directly
--SKIPIF--
<?php if (!extension_loaded('hash')) echo 'skip';
--FILE--
<?php
try {
new HashContext;
} catch (Error $e) {
echo "Exception: {$e->getMessage()}\n";
}
--EXPECTF--
Exception: Call to private HashContext::__construct() from invalid context