1--TEST-- 2bug #13181, leaving a context frees the broker resources 3--SKIPIF-- 4<?php 5if(!extension_loaded('enchant')) die('skip, enchant not loader'); 6 7 ?> 8--FILE-- 9<?php 10function get_dictionnary() { 11 $rBroker = enchant_broker_init(); 12 $t = enchant_broker_request_dict($rBroker, 'en'); 13 var_dump($t); 14 return $t; 15} 16$rDict = get_dictionnary(); 17var_dump($rDict); 18enchant_dict_suggest($rDict, "soong"); 19 20function get_broker() { 21 $t = enchant_broker_init(); 22 var_dump($t); 23 return $t; 24} 25 26$rbroker = get_broker(); 27var_dump($rbroker); 28 29function get_dict($broker) { 30 $t = enchant_broker_request_dict($broker, 'en'); 31 var_dump($t); 32 return $t; 33} 34$rDict = get_dict($rbroker); 35var_dump($rDict); 36?> 37--EXPECTF-- 38resource(%d) of type (enchant_dict) 39resource(%d) of type (enchant_dict) 40resource(%d) of type (enchant_broker) 41resource(%d) of type (enchant_broker) 42resource(%d) of type (enchant_dict) 43resource(%d) of type (enchant_dict) 44