xref: /PHP-7.1/ext/com_dotnet/tests/bug73679.phpt (revision 7af945e2)
1--TEST--
2Bug #73679 DOTNET read access violation using invalid codepage
3--SKIPIF--
4<?php # vim:ft=php
5if (!extension_loaded("com_dotnet")) print "skip COM/.Net support not present"; ?>
6--FILE--
7<?php
8
9$stack = new DOTNET("mscorlib", "System.Collections.Stack", -2200000000);
10$stack->Push(".Net");
11$stack->Push("Hello ");
12echo $stack->Pop() . $stack->Pop();
13
14?>
15--EXPECTF--
16Fatal error: Uncaught com_exception: Could not create .Net object - invalid codepage! in %sbug73679.php:%d
17Stack trace:
18#0 %sbug73679.php(%d): dotnet->dotnet('mscorlib', 'System.Collecti...', -2200000000)
19#1 {main}
20  thrown in %sbug73679.php on line %d
21