Trying to do unit testing with UnitTest. I downloaded the file phpunit-6.5.6.phar and I can not figure out what should I do with it? Where to copy it? How to use with openServer? In all articles, the authors said, they say, we write this command to the console:

@php "%~dp0phpunit-5.7.17.phar" %* 

Which console? What do authors mean? In one video, the author generally downloaded the Pear library while others did without it.

Total: How do I do normal testing for PHPUnit using OpenServer. How to connect this framework to the project?

  • To run, you need to download the PHAR file, open the PHP console in OpenServer, and run php Phpunit.phar from there, do not forget to specify the path to this file and the other parameters for the file being trusted. - Daniel Protopopov

1 answer 1

http://php.net/manual/ru/intro.phar.php

The phar module provides the ability to put a whole PHP application in a single file, called phar (PHP Archive), for easier distribution and installation.

The whole task for running this type of file comes down to the correct PHP path on your server.

In the case of OpenServer, right-click on the icon, select "Advanced" -> "Console". Next, go to the place where you have the desired file and write php phpunit-6.5.6.phar with the syntax you need.

I checked it out, on the screen you can see the beginning of the output of phpinfo()

enter image description here