Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have installed PHP and PHPUnit in my PC. Both of these files are in same directory and I have added to enviroment variable path. I have also associate .phar extension to run with php.exe application. Now, when I run phpunit.phar in powershell, it is opened in a new window rather the current one. How can I make this run in the same window everytime.

Note: When I do the same thing in cmd.exe, it is opened in same window which is surprising

share|improve this question

1 Answer 1

Here is a dirty solution I discovered using batch files.

Create a file named phpunit.bat in any of the directory in path environment variables. You can choose windows directory if unsure.

Add the following code to the batch file

@echo off
echo.
"c:\path\to\php\php.exe" "C:\path\to\phpunit.phar" %*
exit
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.