Skip to content

Fix test errors #141

@freephile

Description

@freephile

composer test results in all available memory to be consumed and load to go through the roof so that VSCode disconnects and the terminal becomes unresponsive.

I'm not sure that I've resolved that - but I know that I can allocate a specific amount of memory to composer. In the near term I'm focusing on running PHPUnit tests only on SemanticMediaWiki instead of all core and all extensions.

cd /opt/htdocs/mediawiki
vendor/bin/composer --version

Shows that I'm running PHPUnit 9.6.19

You can actually do this a bit more elegantly with

cd /opt/htdocs/mediawiki/extensions/SemanticMediaWiki
WIKI=demo composer phpunit -- --testsuite semantic-mediawiki-check

which reports

> php ${MW_INSTALL_PATH:-../..}/tests/phpunit/phpunit.php -c phpunit.xml.dist '--testsuite' 'semantic-mediawiki-check'
*******************************************************************************
DEPRECATED: The tests/phpunit/phpunit.php entry point has been deprecated. Use
            `composer phpunit` instead.
*******************************************************************************
Using PHP 8.1.31
PHPUnit 9.6.19 by Sebastian Bergmann and contributors.

Runtime:       PHP 8.1.31
Configuration: phpunit.xml.dist
Warning:       Your XML configuration validates against a deprecated schema.
Suggestion:    Migrate your XML configuration using "--migrate-configuration"!

..                                                                  2 / 2 (100%)

Time: 00:00.168, Memory: 16.00 MB

OK (2 tests, 8 assertions)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions