vendor/bin/phpunit --configuration phpunit.xml --coverage-html coverage. После этого в проекте создается папка coverage и мы можем открыть файл index.html и просмотреть подробную информацию о каждом файле тестирования.
Пример минимального файла phpunit.xml.dist, который подразумевает, что автозагрузчик и всё необходимо для работы наших классов инициализируется в vendor/autoload.php, и что все тесты лежат в каталоге tests в корне проекта, и в подкаталогах этого каталога.
coverage: pcov. tools: 'phpunit' -. name: 'Install PHP dependencies with Composer'.
Contribute to sebastianbergmann/phpunit development by creating an account on GitHub.
PHPUnit is a unit testing framework for the PHP programming language. Laravel has support for PHPUnit included out of the box, and a phpunit.xml file is already set up for your application. In your project your tests directory will contain 2 directories: Feature and Unit.
Check out ./vendor/bin/phpunit. This is the file you will mostly be interacting with to run PHPUnit. It is extremely simple and to the point - all it does is look for Composer’s autoloader and load it.
PHP (/pi:.eɪtʃ.pi:/ англ. PHP: Hypertext Preprocessor — «PHP: препроцессор гипертекста»; первоначально PHP/FI (Personal Home Page / Form Interpreter)...
Laravel is built with testing in mind. In fact, support for testing with PHPUnit is included out of the box and a phpunit.xml file is already set up for your application.