Skip to content

Commit

Permalink
Composer: add phpunit/phpunit as dependency
Browse files Browse the repository at this point in the history
This PR adds `phpunit/phpunit` as composer dependency.

Usage:
* We use it to run unit tests.
* ILIAS/Component uses its mocking framework to analyze component definitions
  during build phase.

Wrapped By:
* Not applicable, provides the binary and classes for test management.

Reasoning:
* Its the standard PHP testing framework.

Maintenance:
* Won't go away any time soon.

Links:
* Documentation: https://phpunit.de

---

This initially felt harmless, but an update to PHPUnit 10 basically destroys
our previous approach to the bundling of testcases in testsuites. Currently we
are using PHPUnits TestSuite class in various places, most notably in our global
ILIASSuite, to bundle our cases. That global suite (and some local suites) are
then added to a phpunit.xml to make them available to PHPUnit.

PHPUnit, though, seems to think of the TestSuite class as an internal class that
is used to process the organisation of tests via directories or XML. When using
PHPUnit 10 it complains that we directly add a TestSuite instance via the XML.

Hence, this uses the new order introduced by the Component Revision to allow
PHPUnit to discover tests based on an expression for directories. Individual
components could well add additional phpunit.xmls themselves to implement their
own testssuites. We could also use `--filter` to select certain tests.
  • Loading branch information
klees committed Apr 26, 2024
1 parent 3a09ef8 commit 7fc5638
Show file tree
Hide file tree
Showing 156 changed files with 4,635 additions and 11,406 deletions.
19 changes: 0 additions & 19 deletions components/ILIAS/ADT/tests/ilServicesADTSuite.php

This file was deleted.

This file was deleted.

This file was deleted.

39 changes: 0 additions & 39 deletions components/ILIAS/Accordion/tests/ilServicesAccordionSuite.php

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

36 changes: 0 additions & 36 deletions components/ILIAS/AuthApache/tests/ilServicesAuthApacheSuite.php

This file was deleted.

Loading

0 comments on commit 7fc5638

Please sign in to comment.