Json phpunit tests updates, fixes in test php with ignore for deprecated
This commit is contained in:
@@ -75,6 +75,7 @@ print "EL_O: <pre>" . print_r($el_o, true) . "</pre>";
|
||||
echo "<hr>";
|
||||
print "buildHtml(): <pre>" . htmlentities($el_o->buildHtml()) . "</pre>";
|
||||
echo "<hr>";
|
||||
/** @phpstan-ignore-next-line */
|
||||
print "phfo(\$el_o): <pre>" . htmlentities($el_o::printHtmlFromObject($el_o, true)) . "</pre>";
|
||||
echo "<hr>";
|
||||
print "phfa(\$el_list): <pre>" . htmlentities($el_o::buildHtmlFromList($el_o_list, true)) . "</pre>";
|
||||
|
||||
@@ -63,6 +63,11 @@ print "J/S::E-JSON ERROR: " . $json_class::jsonGetLastError() . ": " . $json_cla
|
||||
// print "S::JSON: $json: " . DgS::printAr($output) . "<br>";
|
||||
// print "S::JSON ERROR: " . Jason::jsonGetLastError() . ": " . Jason::jsonGetLastError(true) . "<br>";
|
||||
|
||||
// convert an array to json
|
||||
$array = ['foo' => 'bar'];
|
||||
$output = Json::jsonConvertArrayTo($array);
|
||||
print "S::JSON: " . DgS::printAr($array) . " => " . $output . "<br>";
|
||||
|
||||
print "</body></html>";
|
||||
|
||||
// __END__
|
||||
|
||||
@@ -51,6 +51,7 @@ echo "<br><b>AUTO DETECT</b><br>";
|
||||
// DEPRECATED
|
||||
// $get_locale = Language\GetLocale::setLocale();
|
||||
// print "[AUTO, DEPRECATED]: " . Support::printAr($get_locale) . "<br>";
|
||||
/** @phpstan-ignore-next-line */
|
||||
$get_locale = Language\GetLocale::setLocaleFromSession(
|
||||
SITE_LOCALE,
|
||||
str_replace('/', '', CONTENT_PATH),
|
||||
@@ -58,6 +59,7 @@ $get_locale = Language\GetLocale::setLocaleFromSession(
|
||||
BASE . INCLUDES . LOCALE
|
||||
);
|
||||
print "[NAMED CONSTANTS OUTSIDE]: " . Support::printAr($get_locale) . "<br>";
|
||||
/** @phpstan-ignore-next-line */
|
||||
$get_locale = Language\GetLocale::setLocaleFromSession(
|
||||
'en',
|
||||
'foo',
|
||||
@@ -74,6 +76,7 @@ $_SESSION['DEFAULT_LOCALE'] = 'ja_JP.UTF-8';
|
||||
$_SESSION['DEFAULT_CHARSET'] = 'UTF-8';
|
||||
$_SESSION['DEFAULT_DOMAIN'] = 'admin';
|
||||
$_SESSION['LOCALE_PATH'] = BASE . INCLUDES . LOCALE;
|
||||
/** @phpstan-ignore-next-line */
|
||||
$get_locale = Language\GetLocale::setLocaleFromSession(
|
||||
SITE_LOCALE,
|
||||
SITE_DOMAIN,
|
||||
@@ -90,6 +93,7 @@ $_SESSION['DEFAULT_LOCALE'] = '00000#####';
|
||||
$_SESSION['DEFAULT_CHARSET'] = '';
|
||||
$_SESSION['DEFAULT_DOMAIN'] = 'admin';
|
||||
$_SESSION['LOCALE_PATH'] = BASE . INCLUDES . LOCALE;
|
||||
/** @phpstan-ignore-next-line */
|
||||
$get_locale = Language\GetLocale::setLocaleFromSession(
|
||||
SITE_LOCALE,
|
||||
SITE_DOMAIN,
|
||||
|
||||
@@ -35,10 +35,12 @@ print '<div><h1>' . $PAGE_NAME . '</h1></div>';
|
||||
print "ALREADY from config.php: " . \CoreLibs\Debug\Support::printAr($_ENV) . "<br>";
|
||||
|
||||
// test .env in local
|
||||
/** @phpstan-ignore-next-line */
|
||||
$status = \CoreLibs\Get\DotEnv::readEnvFile('.', 'test.env');
|
||||
print "test.env: STATUS: " . $status . "<br>";
|
||||
print "AFTER reading test.env file: " . \CoreLibs\Debug\Support::printAr($_ENV) . "<br>";
|
||||
|
||||
print "</body></html>";
|
||||
// ;;
|
||||
|
||||
// __END__
|
||||
|
||||
Reference in New Issue
Block a user