- Open directory
/tests/RealTelegramApi/
. - Copy
RealTelegramApiTest.dist.php
toRealTelegramApiTest.php
. - Add your bot authentication token to constant
TOKEN
inRealTelegramApiTest.php
, for example:
// ...
final class RealTelegramApiTest extends TestCase
{
private const TOKEN = '110201543:AAHdqTcvCH1vGWJxfSeofSAs0K5PALDsaw';
// ...
- Put your test code into
testBase()
method inRealTelegramApiTest.php
. - Run tests with real Telegram bot API via PHPUnit:
./vendor/bin/phpunit --group=realApi
The package is tested with PHPUnit. To run tests:
./vendor/bin/phpunit
The package tests are checked with Infection mutation framework with Infection Static Analysis Plugin. To run it:
./vendor/bin/roave-infection-static-analysis-plugin
The code is statically analyzed with Psalm. To run static analysis:
./vendor/bin/psalm
Package used PHP CS Fixer to maintain PER CS 2.0 code style. To check and fix code style:
composer cs-fix
Use ComposerRequireChecker to detect transitive Composer dependencies:
./vendor/bin/composer-require-checker