Skip to content

test: add unit tests for Utils/ExecutionTime - #198

Open
tahakotil wants to merge 2 commits into
TheAlgorithms:masterfrom
tahakotil:add-execution-time-test
Open

tahakotil wants to merge 2 commits into
TheAlgorithms:masterfrom
tahakotil:add-execution-time-test

Conversation

@tahakotil

Copy link
Copy Markdown

Adds a dedicated PHPUnit test class for Utils/ExecutionTime.php, which previously had no test coverage.

Verified locally:

  • phpunit tests — 287 tests, OK (285 before this change)
  • vendor/bin/phpcs -n tests/Utils/ExecutionTimeTest.php — clean

The tests assert that no output is emitted while the timer is alive and that __destruct() reports a plausible elapsed time, including that the reported interval covers the sleep duration. DIRECTORY.md is updated to list the new test file, following the existing pattern.

@tahakotil

Copy link
Copy Markdown
Author

Hi, friendly ping on this one. The CI workflows (PHP Composer, Code style) are waiting for maintainer approval since this is my first contribution here. Could someone approve the run and take a look when you have a moment? Happy to adjust anything. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants