Download the PHP package portrino/codeception-helper-module without Composer
On this page you can find all versions of the php package portrino/codeception-helper-module. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download portrino/codeception-helper-module
More information about portrino/codeception-helper-module
Files in portrino/codeception-helper-module
Package codeception-helper-module
Short Description Generic helper module for codeception acceptance testing
License
Informations about the package codeception-helper-module
Codeception Helper Module
Collection of modules for codeception acceptance testing with TYPO3 and Shopware. You can use this module as base for your codeception acceptance testsuite. It provides a set of modules, abstract page objects and interfaces to make acceptance testing a bit cleaner and easier in context of TYPO3 and Shopware.
Installation
You need to add the repository into your composer.json file
Modules
You can use module(s) as any other codeception module, by adding '\Codeception\Module\Portrino******' to the enabled modules in your codeception suite configurations.
Database module
Update codeception build
Methods
truncateTableInDatabase($table)
Truncates the $table
.
deleteFromDatabase($table, $criteria)
Deletes the row(s) from $table
matching the $criteria
TYPO3 module
Update codeception build
Methods
executeCommand
Executes the specified typo3_console $command
.
executeSchedulerTask
Executes tasks that are registered in the scheduler module.
flushCache
Flushes TYPO3 core caches first and after that, flushes caches from extensions.
flushCacheGroups
Flushes all caches in specified groups. Valid group names are by default:
- all
- lowlevel
- pages
- system
importIntoDatabase
Import $file into database.
Shopware module
Update codeception build
Methods
executeCommand
Executes the specified shopware_console $command
.
runSqlCommand
Executes SQL query in shopware_console.
activatePlugin
Activates Shopware plugin.
installPlugin
Install Shopware plugin. If activate = true, the plugin will be activated after installation.
refreshPluginList
Refresh Shopware plugin-list. You need to call this sometimes before installing a plugin.
regenerateThemeCache
Regenerates the theme-cache.
clearCache
Clear Shopware cache.
setPluginConfiguration
Set configuration of Shopware plugin by plugin-name, configuration-key and configuration-value.
- you'll be able to set cofigurations for a specified shop by using the $shop parameter
Interfaces
You should use our constants defined in some interfaces to prevent typos and make refactoring easier.
TYPO3
\Portrino\Codeception\Interfaces\DatabaseTables\Typo3Database
\Portrino\Codeception\Interfaces\Cookies\Typo3Cookie
\Portrino\Codeception\Interfaces\Commands\Typo3Command
Example:
Shopware
\Portrino\Codeception\Interfaces\DatabaseTables\ShopwareDatabase
\Portrino\Codeception\Interfaces\Cookies\ShopwareCookie
\Portrino\Codeception\Interfaces\Commands\ShopwareCommand
Fixtures Helper
For the sake of simplicity we added an little Helper for the Codeception Fixture feature.
Please add in your _bootstrap.php file
'__model' => \Portrino\Codeception\Model\Typo3\Typo3FrontendUser::class,
as the first entry in your Fixture array. your Fixture has to look like
now you'll be able to use your Fixture with our adapted Fixtures class
Hints
Use codeception with shopware
Due the fact that shopware only supports some very old versions of packages like guzzlehttp/guzzle
or symfony/process
,
we advise you to put all the testing stuff into a indepented composer.json file under a seperate location like web/tests/Codeception/
. Do not add codeception\codeception
package into the root composer.json of shopware - you will get trouble.
Autoloading
To autoload vendor packages you have to require_once the autoload.php in your composers _bootstrap.php
file.
Authors
- André Wuttig - Initial work, Unit Tests - aWuttig
- Leopold Engst - Unit Tests, Documentation - leen2104
- Axel Böswetter - Bugfixes - EvilBMP
See also the list of contributors who participated in this project.
All versions of codeception-helper-module with dependencies
composer/semver Version ~1.4.2
ocramius/package-versions Version ~1.1.3
symfony/process Version ~3.3.10 || ~2.7