summaryrefslogtreecommitdiff
path: root/sapi/cli
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2013-09-20 16:01:11 +0200
committerAnatol Belski <ab@php.net>2013-09-20 16:01:11 +0200
commitac562b027b1a588d9a8f145cd0d89f3c03450825 (patch)
tree20c4fc63738bbfcf9fcd1bd4e5930229c085d55b /sapi/cli
parentdcafcd01a9c52ab31e013eddc58a308b0e0e105b (diff)
parent8f146c2bb0dcba3307f08a839554be056e660f34 (diff)
downloadphp-git-ac562b027b1a588d9a8f145cd0d89f3c03450825.tar.gz
Merge branch 'PHP-5.5'
* PHP-5.5: Fixed bug #65678 the test cli_process_title_windows will fails on particular environnement
Diffstat (limited to 'sapi/cli')
-rw-r--r--sapi/cli/tests/cli_process_title_windows.phpt7
1 files changed, 4 insertions, 3 deletions
diff --git a/sapi/cli/tests/cli_process_title_windows.phpt b/sapi/cli/tests/cli_process_title_windows.phpt
index 309c09c0e1..472f9c10fe 100644
--- a/sapi/cli/tests/cli_process_title_windows.phpt
+++ b/sapi/cli/tests/cli_process_title_windows.phpt
@@ -20,7 +20,7 @@ if (strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN')
// no warnings/errors.
$is_windows8 = false;
-$ps_output = shell_exec("PowerShell \"(Get-Host).UI.RawUI.WindowTitle\"");
+$ps_output = shell_exec("PowerShell -NoProfile \"(Get-Host).UI.RawUI.WindowTitle\"");
if ($ps_output === null)
{
echo "Get-Host failed\n";
@@ -28,7 +28,8 @@ if ($ps_output === null)
}
$ps_output = trim($ps_output);
-if (($ps_output == "Windows PowerShell") || ($ps_output == "Administrator: Windows PowerShell"))
+$end_title_windows8 = ": Windows PowerShell";
+if (($ps_output == "Windows PowerShell") || (strlen($ps_output) > strlen($end_title_windows8) && substr($ps_output,-strlen($end_title_windows8)) === $end_title_windows8))
$is_windows8 = true;
echo "*** Testing setting the process title ***\n";
@@ -45,7 +46,7 @@ if ($is_windows8)
}
else
{
- $loaded_title = shell_exec("PowerShell \"get-process cmd*,powershell* | Select-Object mainWindowTitle | ft -hide\"");
+ $loaded_title = shell_exec("PowerShell -NoProfile \"get-process cmd*,powershell* | Select-Object mainWindowTitle | ft -hide\"");
if ($loaded_title === null)
{