phphleb/test-o

Very simple unit tests for your project

dev-main 2024-01-29 13:40 UTC

This package is auto-updated.

Last update: 2024-04-29 14:09:41 UTC


README

PHP License: MIT

Install using Composer:

composer require phphleb/test-o

An example check is in the "example" folder.

To run tests (methods starting with "test") for all files (classes) (ending with "Test.php" and inherited from "Phphleb\TestO\TestCase") in a folder:

php ./vendor/phphleb/test-o/run ./vendor/phphleb/test-o/example

Tests will be performed:

Test-O 0.0.0 by Foma Tuturov.

Runtime:       PHP 8.2.3
...

Time: 00:00:00, Memory: 3.5 MB

OK Tests: 3, Assertions: 3

Running tests in a different visual mode:

php ./vendor/phphleb/test-o/run -L ./vendor/phphleb/test-o/example

Tests will be performed:

Test-O 0.0.0 by Foma Tuturov.

Runtime:       PHP 8.2.3
1 OK Phphleb\TestO\Example\ExampleTest:testExampleFirstMethod (0.007ms)
2 OK Phphleb\TestO\Example\ExampleTest:testExampleSecondMethod (0.003ms)
3 OK Phphleb\TestO\Example\ExampleTest:testExampleThirdMethod (0.007ms)


Time: 00:00:00, Memory: 5.23 MB

OK Tests: 3, Assertions: 3


To run tests on a single file (class):

php ./vendor/phphleb/test-o/run ./vendor/phphleb/test-o/example/ExampleTest.php

If tests are used for the HLEB2 framework:

composer require phphleb/tests
php ./vendor/phphleb/test-o/run ./vendor/phphleb/tests