/
Running tests
Running tests
Innomatic supports unit testing with PHPUnit and provides a preconfigured phpunit.xml configuration file.
Applications can add PHPUnit tests using the unittest component.
Test files should be added inside a tests subdirectory inside the tested class folder:
innomatic/core/classes/innomatic/core/InnomaticSettings.php innomatic/core/classes/innomatic/core/tests/InnomaticSettingsTest.php
Example definition in application.xml file:
<class name="innomatic/core/InnomaticSettings.php" /> <unittest name="innomatic/core/tests/InnomaticSettingsTest.php" />
To test Innomatic code, PHPUnit must be launched inside the “innomatic” directory of an installed Innomatic instance:
cd innomatic phpunit
Limitations
Innomatic applications to be tested must be deployed inside a working Innomatic installation before running the test suite (you cannot run the tests inside the sources folder).
Please note that as of Innomatic 6.4.x unit testing support is experimental; there are no such facilities like automatic generation of test databases, etc.
, multiple selections available,
Related content
Step 1: Unit testing
Step 1: Unit testing
More like this
Unit Test component
Unit Test component
More like this
Step 5: Code classes
Step 5: Code classes
More like this
Beginner Tutorial
Beginner Tutorial
More like this
Step 4: The Innomatic Container
Step 4: The Innomatic Container
More like this
Step 4: Setting the environment type
Step 4: Setting the environment type
More like this