Download the PHP package eliashaeussler/typo3-codeception-helper without Composer
On this page you can find all versions of the php package eliashaeussler/typo3-codeception-helper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download eliashaeussler/typo3-codeception-helper
More information about eliashaeussler/typo3-codeception-helper
Files in eliashaeussler/typo3-codeception-helper
Package typo3-codeception-helper
Short Description Helper functions for Codeception tests within TYPO3 extensions
License GPL-2.0-or-later
Informations about the package typo3-codeception-helper
This library provides some helper functions for Codeception tests within TYPO3 extensions. In addition, an application entrypoint modifier extension for coverage collection within acceptance tests is distributed.
🔥 Installation
⚡ Usage
ApplicationEntrypointModifier
extension
Source:
Codeception\Extension\ApplicationEntrypointModifier
A Codeception extension that aims to ease the integration effort
when collecting code coverage with codeception/c3
.
It replaces an existing entrypoint (e.g. typo3/index.php
) with
a modified entrypoint that includes the distributed c3.php
file.
Enable this extension in your codeception.yml
file:
For each entrypoint, the following config must be provided:
Config name | Description | Default value |
---|---|---|
web-dir |
Relative path from project root to directory that contains the main entrypoint | – |
main-entrypoint |
Name of the entrypoint to replace (the file being accessed by the web server) | index.php |
app-entrypoint |
Name of the original relocated entrypoint (the renamed main entrypoint) | app.php |
Example
Given the following directory structure:
Once the extension is enabled and properly configured, the following directory structure exists after the test suite is started:
Backend
module
Source:
Codeception\Module\Backend
A Codeception module that allows to perform actions within TYPO3 backend. It can for example be used to log into the TYPO3 backend.
[!NOTE] This module requires the
WebDriver
module to be installed and enabled.
Enable this module in your codeception.yml
file:
Available methods
login($username, $password): void
Perform backend login for the given user. The user is identified by the given username and is authenticated by the given password.
Example:
loginAs($username): void
Perform backend login for the given user. The user is identified by the given username which must be configured in the codeception module config (see Configure backend users).
Example:
openModule($identifier): void
Open a backend module by clicking on the module link. The module link is identified by a given node identifier. Note that the identifier differs between TYPO3 versions (see example below).
Example:
Configure backend users
[!NOTE] Backend users are not automatically created by this module. You need to take care of that by your own, e.g. by importing static database fixtures before tests are executed.
In order to use the loginAs()
method, existing backend users
must be configured in the module config section:
🧑💻 Contributing
Please have a look at CONTRIBUTING.md
.
⭐ License
This project is licensed under GNU General Public License 2.0 (or later).
All versions of typo3-codeception-helper with dependencies
composer-runtime-api Version ^2.1
codeception/c3 Version ^2.8
codeception/codeception Version ^4.1.11 || ^5.0
symfony/filesystem Version ^5.4 || ^6.0 || ^7.0