oliverklee / oelib
Useful stuff for TYPO3 extension development: helper functions for unit testing, templating and automatic configuration checks.
Installs: 324 288
Dependents: 3
Suggesters: 0
Security: 0
Stars: 0
Watchers: 4
Forks: 8
Open Issues: 87
Type:typo3-cms-extension
Requires
- php: ^7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.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.37 || ^12.4.15
- typo3/cms-extbase: ^11.5.37 || ^12.4.15
- typo3/cms-fluid: ^11.5.37 || ^12.4.15
- typo3/cms-frontend: ^11.5.37 || ^12.4.15
- typo3fluid/fluid: ^2.7.4
Requires (Dev)
- ergebnis/composer-normalize: 2.43.0
- friendsofphp/php-cs-fixer: 3.64.0
- phpstan/extension-installer: 1.4.3
- phpstan/phpstan: 1.12.4
- phpstan/phpstan-phpunit: 1.4.0
- phpstan/phpstan-strict-rules: 1.6.1
- phpunit/phpunit: 9.6.21
- saschaegerer/phpstan-typo3: 1.10.2
- sjbr/static-info-tables: ^11.5.5 || ^12.4.3
- squizlabs/php_codesniffer: 3.10.3
- ssch/typo3-rector: 2.6.5
- ssch/typo3-rector-testing-framework: 2.0.1
- symfony/console: ^5.4.44 || ^6.4.12 || ^7.1.5
- symfony/translation: ^5.4.44 || ^6.4.12 || ^7.1.5
- symfony/yaml: ^5.4.44 || ^6.4.12 || ^7.1.5
- typo3/coding-standards: 0.6.1
- typo3/testing-framework: 7.1.0
- webmozart/assert: ^1.11.0
Replaces
- typo3-ter/oelib: v6.0.2
- dev-main / 6.0.x-dev
- v6.0.2
- v6.0.1
- v6.0.0
- 5.2.x-dev
- 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-dependabot/composer/phpstan/phpstan-1.12.8
- dev-l10n_main
- dev-test/functional-warnings
- dev-test/phpstan-deprecation
This package is auto-updated.
Last update: 2024-11-06 22:54:04 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 ci: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:
typo3DatabaseUsername
typo3DatabasePassword
typo3DatabaseName
On the command line
To run all functional tests on the command line:
typo3DatabaseUsername=typo3 typo3DatabasePassword=typo3pass typo3DatabaseName=typo3_test composer ci: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:
typo3DatabaseUsername
typo3DatabasePassword
typo3DatabaseName