Andrey Yasko 4e9d63a26b RC3 update packs: Organizations pack finds its module, Messenger config at 15.0.0.DEV (#5933) 16 giờ trước cách đây
..
integration b39060ae05 Discussions: category, author and reactions on NEO cards and pages (#5917) 1 ngày trước cách đây
units 4e9d63a26b RC3 update packs: Organizations pack finds its module, Messenger config at 15.0.0.DEV (#5933) 16 giờ trước cách đây
.env.example fae693a793 Integration tests #5694 1 tháng trước cách đây
README.md 20e4ee7ef1 AGENTS.md reorganisation (#5793) 1 tuần trước cách đây
bootstrap.php 2537bc2e7a Performance: OPcache sizing, asset compression/caching, cover transcoder, disk-read transcoding (#5704) 2 tuần trước cách đây
phpcpd.sh 59557c182d phpunit tests reorganization #5669 1 tháng trước cách đây
phpunit.xml fae693a793 Integration tests #5694 1 tháng trước cách đây

README.md

ABOUT

Unit tests for UNA.

INSTALLATION

  1. Get composer.

http://getcomposer.org/doc/00-intro.md#installation-nix

  1. Install dependences.

Run the following from the script root folder (includes test tools from require-dev):

composer.phar install

or:

composer install

Alternatively:

phing prepare

Production / package installs should omit test tools:

composer install --no-dev

USING

Run the following command from the script root folder after installation:

./plugins/bin/phpunit -c tests/phpunit.xml

or:

composer test

Alternatively:

phing test

JUnit report: logs/junit.xml.

Unit tests only:

phing test-units

or:

composer test-units

JUnit report: logs/junit-units.xml.

Integration tests only:

phing test-integration

or:

composer test-integration

JUnit report: logs/junit-integration.xml.

Integration tests read tests/.env when present (cp tests/.env.example tests/.env). Without that file they use installer defaults. Tests skip an account that is not installed.

DOCKER

Run the same suites inside the php service so PHP can reach MariaDB at host mysql. From the repository root, with docker compose up -d and UNA already installed:

Unit tests:

docker compose exec -w /opt/una php ./plugins/bin/phpunit -c tests/phpunit.xml --testsuite Units

Integration tests:

docker compose exec -w /opt/una php ./plugins/bin/phpunit -c tests/phpunit.xml --testsuite Integration

One test class or method:

docker compose exec -w /opt/una php ./plugins/bin/phpunit -c tests/phpunit.xml --filter TestName