WordPress / WordPress/phpunit-test-runner
test.php wastes CPU cycles and bandwith downloading PHPUnit every time
Open
Nobody has claimed this yet.
bug
enhancement
help wanted
- Dominant language
- PHP
- Stars
- 77
- Forks
- 77
- Avg merge
- 15d 15h
- Merged PRs (30d)
- 4
Description
I noticed that running php test.php downloads PHPUnit on every run, even if phpunit is already in the system and even if phpunit.phar has already been downloaded.
$ phpunit --version
PHPUnit 5.7.27 by Sebastian Bergmann and contributors.
$ ll -h /tmp/wp-test-runner/phpunit.phar
-rw-rw-r-- 1 benchmark benchmark 2.9M Feb 1 07:56 /tmp/wp-test-runner/phpunit.phar
$ php test.php
Environment variables pass checks.
cd '/tmp/wp-test-runner'; php phpunit.phar
PHP version: 7.0.30-1+ubuntu14.04.1+deb.sury.org+1 (/usr/bin/php7.0)
Installing...
Running as single site... To run multisite, use -c tests/phpunit/multisite.xml
Not running ajax tests. To execute these, use --group ajax.
Not running ms-files tests. To execute these, use --group ms-files.
Not running external-http tests. To execute these, use --group external-http.
PHPUnit 5.7.27 by Sebastian Bergmann and contributors.
............................................................. 61 / 8703 ( 0%)
............................................................. 122 / 8703 ( 1%)
............................................................. 183 / 8703 ( 2%)
............................................................. 244 / 8703 ( 2%)
............................................................. 305 / 8703 ( 3%)
............................................................. 366 / 8703 ( 4%)
............................................................. 427 / 8703 ( 4%)
............................................................. 488 / 8703 ( 5%)
............................................................. 549 / 8703 ( 6%)
............................................................. 610 / 8703 ( 7%)
............................................................. 671 / 8703 ( 7%)
............................................................. 732 / 8703 ( 8%)
............................................................. 793 / 8703 ( 9%)
....
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in test.php and inspect how it locates or downloads PHPUnit. Run php test.php with PHPUnit available as phpunit and with phpunit.phar already present, then verify the existing installation or archive is reused instead of downloaded again.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- cli, testing-qa
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 42/100