oliverklee / oelib
Useful stuff for TYPO3 extension development: helper functions for unit testing, templating and automatic configuration checks.
Requires
- php: ^7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0
- ext-dom: *
- ext-json: *
- ext-libxml: *
- ext-zip: *
- doctrine/dbal: ^2.13.8 || ^3.9
- psr/log: ^1.0 || ^2.0 || ^3.0
- symfony/polyfill-php80: ^1.31.0
- typo3/cms-core: ^11.5.41 || ^12.4.41
- typo3/cms-extbase: ^11.5.41 || ^12.4.41
- typo3/cms-fluid: ^11.5.41 || ^12.4.41
- typo3/cms-frontend: ^11.5.41 || ^12.4.41
- typo3fluid/fluid: ^2.7.4 || ^4.0.2
Requires (Dev)
- ergebnis/composer-normalize: 2.50.0
- friendsofphp/php-cs-fixer: 3.95.1
- helmich/typo3-typoscript-lint: 2.5.2 || 3.3.0
- php-parallel-lint/php-parallel-lint: 1.4.0
- phpstan/extension-installer: 1.4.3
- phpstan/phpstan: 1.12.32
- phpstan/phpstan-phpunit: 1.4.2
- phpstan/phpstan-strict-rules: 1.6.2
- phpunit/phpunit: 9.6.34
- rector/type-perfect: 1.0.0
- saschaegerer/phpstan-typo3: 1.10.2
- sjbr/static-info-tables: ^11.5.5 || ^12.4.5
- squizlabs/php_codesniffer: 4.0.1
- ssch/typo3-rector: 2.15.2
- ssch/typo3-rector-testing-framework: 2.0.1
- symfony/console: ^5.4 || ^6.4 || ^7.4
- symfony/translation: ^5.4 || ^6.4 || ^7.4
- symfony/yaml: ^5.4 || ^6.4 || ^7.4
- typo3/cms-extensionmanager: ^11.5 || ^12.4
- typo3/coding-standards: 0.6.1 || 0.8.0
- typo3/testing-framework: 7.1.1
Conflicts
- webmozart/assert: < 1.12.1
Replaces
- typo3-ter/oelib: v6.2.1
- dev-main / 6.3.x-dev
- v6.2.1
- v6.2.0
- v6.1.1
- v6.1.0
- v6.0.3
- v6.0.2
- v6.0.1
- v6.0.0
- v5.2.2
- v5.2.1
- v5.2.0
- v5.1.0
- v5.0.2
- v5.0.1
- v5.0.0
- v4.3.1
- v4.3.0
- v4.2.0
- v4.1.9
- v4.1.8
- v4.1.7
- v4.1.6
- v4.1.5
- v4.1.4
- v4.1.3
- v4.1.2
- v4.1.1
- v4.1.0
- v4.0.1
- v4.0.0
- v3.6.4
- v3.6.3
- v3.6.2
- v3.6.1
- v3.6.0
- v3.5.0
- v3.4.1
- v3.4.0
- v3.3.0
- v3.2.1
- v3.2.0
- v3.1.1
- v3.1.0
- v3.0.3
- v3.0.2
- v3.0.1
- v3.0.0
- v2.3.5
- v2.3.4
- v2.3.3
- v2.3.2
- v2.3.1
- v2.3.0
- v2.2.0
- v2.1.0
- v2.0.1
- v2.0.0
- v1.6.0
- v1.5.0
- v1.4.0
- 1.3.1
- 1.3.0
- 1.2.0
- 1.1.2
- 1.1.1
- 1.1.0
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- v0.9.8
- v0.9.7
- v0.9.6
- v0.9.5
- v0.9.4
- dev-feature/registry-accessors
- dev-test/functional-warnings
- dev-test/phpstan-deprecation
- dev-poc/typo3-13
- dev-task/drop-cache-nullifyer
- dev-task/drop-writable-environment
- dev-l10n_main
This package is auto-updated.
Last update: 2026-04-20 19:22:29 UTC
README
This extension provides useful stuff for extension development: helper functions for unit testing, templating and automatic configuration checks.
Most of the documentation is in ReST format in the Documentation/ folder and is rendered as part of the TYPO3 documentation.
Running the tests locally
You will need to have a Git clone of the extension for this with the Composer dependencies installed.
Running the unit tests
On the command line
To run all unit tests on the command line:
composer check:tests:unit
To run all unit tests in a directory or file (using the directory
Tests/Unit/Model/ as an example):
.Build/vendor/bin/phpunit -c .Build/vendor/typo3/testing-framework/Resources/Core/Build/UnitTests.xml Tests/Unit/Model/
In PhpStorm
First, you need to configure the path to PHPUnit in the settings:
Languages & Frameworks > PHP > Test Frameworks
In this section, configure PhpStorm to use the Composer autoload and the script
path .Build/vendor/autoload.php within
your project.
In the Run/Debug configurations for PHPUnit, use an alternative configuration file:
.Build/vendor/typo3/testing-framework/Resources/Core/Build/UnitTests.xml
Running the functional tests
You will need a local MySQL user that has the permissions to create new databases.
In the examples, the following credentials are used:
- user name:
typo3 - password:
typo3pass - DB name prefix:
typo3_test(optional) - DB host:
localhost(omitted as this is the default)
You will need to provide those credentials as environment variables when running the functional tests:
typo3DatabaseUsernametypo3DatabasePasswordtypo3DatabaseName
On the command line
To run all functional tests on the command line:
typo3DatabaseUsername=typo3 typo3DatabasePassword=typo3pass typo3DatabaseName=typo3_test composer check:tests:functional
To run all functional tests in a directory or file (using the directory
Tests/Functional/Authentication/ as an example):
typo3DatabaseUsername=typo3 typo3DatabasePassword=typo3pass typo3DatabaseName=typo3_test .Build/vendor/bin/phpunit -c .Build/vendor/typo3/testing-framework/Resources/Core/Build/FunctionalTests.xml Tests/Functional/Authentication/
In PhpStorm
First, you need to configure the path to PHPUnit in the settings:
Languages & Frameworks > PHP > Test Frameworks
In this section, configure PhpStorm to use the Composer autoload and the script
path .Build/vendor/autoload.php within
your project.
In the Run/Debug configurations for PHPUnit, use an alternative configuration file:
.Build/vendor/typo3/testing-framework/Resources/Core/Build/FunctionalTests.xml
Also set the following environment variables in your runner configuration:
typo3DatabaseUsernametypo3DatabasePasswordtypo3DatabaseName