oliverklee / oelib
Useful stuff for TYPO3 extension development: helper functions for unit testing, templating and automatic configuration checks.
Installs: 169 896
Dependents: 3
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 9
Open Issues: 63
Type:typo3-cms-extension
Requires
- php: ^7.2.0 || ~8.0.0 || ~8.1.0 || ~8.2.0
- ext-dom: *
- ext-json: *
- ext-libxml: *
- ext-zip: *
- doctrine/dbal: ^2.10
- psr/log: ^1.0 || ^2.0 || ^3.0
- symfony/mime: ^5.2.6 || ^6.1.3
- typo3/cms-core: ^10.4.11 || ^11.5.4
- typo3/cms-extbase: ^10.4.11 || ^11.5.4
- typo3/cms-fluid: ^10.4.11 || ^11.5.4
- typo3/cms-frontend: ^10.4.11 || ^11.5.4
- typo3fluid/fluid: ^2.6.10
Requires (Dev)
- ergebnis/composer-normalize: ^2.19.0
- friendsofphp/php-cs-fixer: ^3.4.0
- php-coveralls/php-coveralls: ^2.5.3
- phpstan/extension-installer: ^1.2.0
- phpstan/phpstan: ^1.9.4
- phpstan/phpstan-phpunit: ^1.3.2
- phpstan/phpstan-strict-rules: ^1.4.4
- phpunit/phpunit: ^8.5.31
- saschaegerer/phpstan-typo3: ^1.8.2
- sjbr/static-info-tables: ^6.9.6 || ^11.5.2
- squizlabs/php_codesniffer: ^3.7.1
- typo3/cms-extensionmanager: ^10.4.11 || ^11.5.4
- typo3/coding-standards: ^0.5.5
- typo3/testing-framework: ^6.16.6
Suggests
- sjbr/static-info-tables: for the country, currency and federal state data mappers
Replaces
- typo3-ter/oelib: v5.1.0
- dev-main / 5.1.x-dev
- 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/saschaegerer/phpstan-typo3-tw-1.8.5
- dev-dependabot/composer/phpstan/phpstan-phpunit-tw-1.3.13
- dev-feature/rector
- dev-feature/82-lowest
- dev-task/alias
This package is auto-updated.
Last update: 2023-05-29 05:08:07 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