PHP Testing - 1 Setup with Composer - phpunit - php test tutorial

Опубликовано: 19 Май 2025
на канале: codeForMe
666
12

PHP TESTING WITH PHP UNIT TEST.
We will be installing and insuring that phpunit is working.

This is a part of a series of 4 videos that will walk through how to effectively write unit tests and learn how to unit test your code using the PHP phpunit library.

Chapters:

0:00 PHP testing series description
0:12 Creating a composer project
0:50 Correcting namespaces
1:00 Installing phpunit that used for the PHP unit testing using composer
1:23 Creating namespace for the test classes
1:33 Creating a test directory that will contain the PHP unit test classes
1:37 Creating a unit test class
1:57 Creating a test method
2:17 Purposely failing the test
2:24 Running the tests using the vendor/bin/phpunit command
2:40 Improving and shortening the test command
2:48 Creating a composer test command
3:11 Running the Test from the composer command: composer test