From 08ed8866a5bba0b23a8d5587116a968512df2568 Mon Sep 17 00:00:00 2001 From: valmat Date: Tue, 8 Apr 2014 08:53:35 +0600 Subject: Ini entries emplemented (issues #64) --- tests/php/dbg.php | 54 ++++++++++++++++++++++++++++++++++++++++---------- tests/php/php_alias.sh | 2 +- 2 files changed, 44 insertions(+), 12 deletions(-) (limited to 'tests/php') diff --git a/tests/php/dbg.php b/tests/php/dbg.php index 003c494..8de0bb8 100644 --- a/tests/php/dbg.php +++ b/tests/php/dbg.php @@ -13,14 +13,46 @@ -var_dump( TestBaseClass\MyClass::CONSTANT1 ); -var_dump( TestBaseClass\MyClass::EXP ); -var_dump( TestBaseClass\MyClass::CONSTANT2 ); -var_dump( TestBaseClass\MyClass::CONSTANT3 ); - -var_dump( TestBaseClass\MyClass::$StatProp1 ); -var_dump( TestBaseClass\MyClass::$Exp ); -var_dump( TestBaseClass\MyClass::$StatProp2 ); -var_dump( TestBaseClass\MyClass::$StatProp3 ); -TestBaseClass\MyClass::$StatProp2 = "otherval"; -var_dump( TestBaseClass\MyClass::$StatProp2 ); +echo "\x1b[1;31m"; +(new ReflectionExtension('extension_for_tests') )->info(); +echo "\x1b[0m"; +echo "\x1b[0;34m"; +var_export( ini_get_all ( 'extension_for_tests' ) ); +echo "\x1b[0m", PHP_EOL; +exit; + +TestIniEntries\iniTest1(); + +//ini_set("extension_for_tests.some_string3", 'RFVBGT') ; +echo PHP_EOL; +echo "extension_for_tests.some_string ={{" , ini_get("extension_for_tests.some_string") , "}}", PHP_EOL; +echo "extension_for_tests.some_string2 ={{" , ini_get("extension_for_tests.some_string2") , "}}", PHP_EOL; +echo "extension_for_tests.some_string3 ={{" , ini_get("extension_for_tests.some_string3") , "}}", PHP_EOL; +echo "extension_for_tests.some_string3 ={{" , ini_get("extension_for_tests.some_bool") , "}}", PHP_EOL; + + +echo "\x1b[1;31m"; +(new ReflectionExtension('extension_for_tests') )->info(); +echo "\x1b[0m"; + +echo "\x1b[0;34m"; +var_export( ini_get_all ( 'extension_for_tests' ) ); +echo "\x1b[0m", PHP_EOL; + +ini_set("extension_for_tests.some_string3", 'RFVBGT') ; +echo "extension_for_tests.some_string3 ={{" , ini_get("extension_for_tests.some_string3") , "}}", PHP_EOL; +ini_restore ( 'extension_for_tests.some_string3' ); +echo "extension_for_tests.some_string3 ={{" , ini_get("extension_for_tests.some_string3") , "}}", PHP_EOL; + + +echo "extension_for_tests.some_bool :"; +var_dump(ini_get("extension_for_tests.some_bool")); +echo PHP_EOL; + +ini_set("extension_for_tests.some_bool", 'off'); + +echo "extension_for_tests.some_bool :"; +var_dump(ini_get("extension_for_tests.some_bool")); +echo PHP_EOL; + +//var_export(php_sapi_name()); diff --git a/tests/php/php_alias.sh b/tests/php/php_alias.sh index f4c7f8f..6947325 100755 --- a/tests/php/php_alias.sh +++ b/tests/php/php_alias.sh @@ -16,4 +16,4 @@ fi LD_LIBRARY_PATH="$(cd $PWD/../.. && echo $PWD):${LD_LIBRARY_PATH}" export LD_LIBRARY_PATH -/usr/bin/php -d extension_dir=../ext_dir -d extension=extfortest.so $1 +/usr/bin/php -d extension_dir=../ext_dir -d extension=extfortest.so -d ini7=47 -d extension_for_tests.frcli=frcli $1 $2 $3 $4 $5 -- cgit v1.2.3