PHPackages                             portrino/codeception-helper-module - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. portrino/codeception-helper-module

AbandonedArchivedLibrary[Testing &amp; Quality](/categories/testing)

portrino/codeception-helper-module
==================================

Generic helper module for codeception acceptance testing

0.5.0(7y ago)42.2k2[1 issues](https://github.com/portrino/codeception-helper-module/issues)PHP

Since Oct 12Pushed 6y ago4 watchersCompare

[ Source](https://github.com/portrino/codeception-helper-module)[ Packagist](https://packagist.org/packages/portrino/codeception-helper-module)[ RSS](/packages/portrino-codeception-helper-module/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (7)Versions (17)Used By (0)

Codeception Helper Module
=========================

[](#codeception-helper-module)

[![Build Status](https://camo.githubusercontent.com/bbc6cd1e45aa72b4ae7d9f2c4179da5143717989e363b29e47010f60368b073f/68747470733a2f2f7472617669732d63692e6f72672f706f727472696e6f2f636f646563657074696f6e2d68656c7065722d6d6f64756c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/portrino/codeception-helper-module)[![Maintainability](https://camo.githubusercontent.com/8ce3e2c09c6aaf9075e500c117e70a432aebf16f434992809431cb39a9883fa9/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f66643230353563396134346664363837393236622f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/portrino/codeception-helper-module/maintainability)[![Maintainability](https://camo.githubusercontent.com/3b6213535660a8a41e3f9733e65492956f53a2681698294ee07c9deeb6236916/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f66333439356565626235386366386235303036352f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/portrino/codeception-helper-module/maintainability)[![Test Coverage](https://camo.githubusercontent.com/cf6837433b3f54dacd864cc995bee1bbe6588cb98b5694488e6289977473701b/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f706f727472696e6f2f636f646563657074696f6e2d68656c7065722d6d6f64756c652f6261646765732f636f7665726167652e737667)](https://codeclimate.com/github/portrino/codeception-helper-module/coverage)[![Test Coverage](https://camo.githubusercontent.com/daed73e0208921f79ef2434590317f01f224ea422835cf92d979ab55518798bc/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f66643230353563396134346664363837393236622f746573745f636f766572616765)](https://codeclimate.com/github/portrino/codeception-helper-module/test_coverage)[![Issue Count](https://camo.githubusercontent.com/af8adc97a638136f4c123e02159ef6199dd7c6d44557525a7c0cb10cc8481967/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f706f727472696e6f2f636f646563657074696f6e2d68656c7065722d6d6f64756c652f6261646765732f69737375655f636f756e742e737667)](https://codeclimate.com/github/portrino/codeception-helper-module)[![Latest Stable Version](https://camo.githubusercontent.com/4c6a790ce938f4cb7b7177c500753035bc12163094b834265976d51e6058ac5f/68747470733a2f2f706f7365722e707567782e6f72672f706f727472696e6f2f636f646563657074696f6e2d68656c7065722d6d6f64756c652f762f737461626c65)](https://packagist.org/packages/portrino/codeception-helper-module)[![Total Downloads](https://camo.githubusercontent.com/01fd9938eb4540c9e99acd97dd01a3d36652f30a13765bdb86527f62338668cd/68747470733a2f2f706f7365722e707567782e6f72672f706f727472696e6f2f636f646563657074696f6e2d68656c7065722d6d6f64756c652f646f776e6c6f616473)](https://packagist.org/packages/portrino/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
------------

[](#installation)

You need to add the repository into your composer.json file

```
composer require --dev portrino/codeception-helper-module
```

Modules
-------

[](#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

[](#database-module)

```
modules:
    enabled:
        - \Portrino\Codeception\Module\Database:
            depends: Db
            no_reset: true # do not reset database after testsuite
```

Update codeception build

```
codecept build
```

### Methods

[](#methods)

#### truncateTableInDatabase($table)

[](#truncatetableindatabasetable)

Truncates the `$table`.

```
  $I->truncateTableInDatabase($table);
```

#### deleteFromDatabase($table, $criteria)

[](#deletefromdatabasetable-criteria)

Deletes the row(s) from `$table` matching the `$criteria`

```
$I->deleteFromDatabase($table, $criteria);
```

### TYPO3 module

[](#typo3-module)

```
modules:
    enabled:
        - \Portrino\Codeception\Module\Typo3:
            depends: Asserts
            domain: www.example.com
```

Update codeception build

```
codecept build
```

### Methods

[](#methods-1)

#### executeCommand

[](#executecommand)

Executes the specified typo3\_console `$command`.

```
$I->executeCommand($command, $arguments = [], $environmentVariables = [])
```

#### executeSchedulerTask

[](#executeschedulertask)

Executes tasks that are registered in the scheduler module.

```
$I->executeSchedulerTask($taskId, $force = false, $environmentVariables = [])
```

#### flushCache

[](#flushcache)

Flushes TYPO3 core caches first and after that, flushes caches from extensions.

```
$I->flushCache($force = false, $filesOnly = false)
```

#### flushCacheGroups

[](#flushcachegroups)

Flushes all caches in specified groups. Valid group names are by default:

- all
- lowlevel
- pages
- system

```
$I->flushCacheGroups($groups)
```

#### importIntoDatabase

[](#importintodatabase)

Import $file into database.

```
$I->importIntoDatabase($file)
```

### Shopware module

[](#shopware-module)

```
modules:
    enabled:
        - \Portrino\Codeception\Module\Shopware:
            depends: Asserts
            bin-dir:
```

Update codeception build

```
codecept build
```

### Methods

[](#methods-2)

#### executeCommand

[](#executecommand-1)

Executes the specified shopware\_console `$command`.

```
$I->executeCommand($command, $arguments = [], $environmentVariables = []);
```

#### runSqlCommand

[](#runsqlcommand)

Executes SQL query in shopware\_console.

```
$I->runSqlCommand($sql);
```

#### activatePlugin

[](#activateplugin)

Activates Shopware plugin.

```
$I->activatePlugin($plugin);
```

#### installPlugin

[](#installplugin)

Install Shopware plugin. If activate = true, the plugin will be activated after installation.

```
$I->installPlugin($plugin, $activate);
```

#### refreshPluginList

[](#refreshpluginlist)

Refresh Shopware plugin-list. You need to call this sometimes before installing a plugin.

```
$I->refreshPluginList();
```

#### regenerateThemeCache

[](#regeneratethemecache)

Regenerates the theme-cache.

```
$I->regenerateThemeCache();
```

#### clearCache

[](#clearcache)

Clear Shopware cache.

```
$I->clearCache();
```

#### setPluginConfiguration

[](#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

```
$I->setPluginConfiguration($plugin, $key, $value, $shop = 1);
```

### Interfaces

[](#interfaces)

You should use our constants defined in some interfaces to prevent typos and make refactoring easier.

#### TYPO3

[](#typo3)

- `\Portrino\Codeception\Interfaces\DatabaseTables\Typo3Database`
- `\Portrino\Codeception\Interfaces\Cookies\Typo3Cookie`
- `\Portrino\Codeception\Interfaces\Commands\Typo3Command`

Example:

```
  $I->seeInDatabase(
        \Portrino\Codeception\Interfaces\DatabaseTables\Typo3::PAGES,
        [
            'uid' => 123,
        ]
  );
```

#### Shopware

[](#shopware)

- `\Portrino\Codeception\Interfaces\DatabaseTables\ShopwareDatabase`
- `\Portrino\Codeception\Interfaces\Cookies\ShopwareCookie`
- `\Portrino\Codeception\Interfaces\Commands\ShopwareCommand`

```
  $I->seeInDatabase(
        \Portrino\Codeception\Interfaces\DatabaseTables\Shopware::ARTICLE,
        [
            'id' => 123,
        ]
  );
```

### Fixtures Helper

[](#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

```
\Codeception\Util\Fixtures::add(
    'your_fixture_name',
    [
        '__model' =>  \Portrino\Codeception\Model\Typo3\Typo3FrontendUser::class,
        'fixtureValueX' => 'X',
        'fixtureValueY' => 'Y'
    ]
);
```

now you'll be able to use your Fixture with our adapted Fixtures class

```
\Portrino\Codeception\Util\Fixtures::get('your_fixture_name');
```

Hints
-----

[](#hints)

### Use codeception with shopware

[](#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

[](#autoloading)

To autoload vendor packages you have to require\_once the autoload.php in your composers `_bootstrap.php` file.

```
require_once(__DIR__ . '/../../../../web/autoload.php');
```

Authors
-------

[](#authors)

[![](https://avatars0.githubusercontent.com/u/726519?s=40&v=4)](https://avatars0.githubusercontent.com/u/726519?s=40&v=4)[![](https://avatars0.githubusercontent.com/u/540478?s=40&v=4)](https://avatars0.githubusercontent.com/u/540478?s=40&v=4)[![](https://avatars0.githubusercontent.com/u/31662036?s=40&v=4)](https://avatars0.githubusercontent.com/u/31662036?s=40&v=4)

- **André Wuttig** - *Initial work, Unit Tests* - [aWuttig](https://github.com/aWuttig)
- **Leopold Engst** - *Unit Tests, Documentation* - [leen2104](https://github.com/leen2104)
- **Axel Böswetter** - *Bugfixes* - [EvilBMP](https://github.com/EvilBMP)

See also the list of [contributors](https://github.com/portrino/codeception-helper-module/graphs/contributors) who participated in this project.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance15

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 93.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~29 days

Recently: every ~100 days

Total

15

Last Release

2721d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/03867e1d2497d7cb7feb932fb301387e143503bfd17c584ef90347b3d7942cf1?d=identicon)[portrino-dev](/maintainers/portrino-dev)

---

Top Contributors

[![aWuttig](https://avatars.githubusercontent.com/u/726519?v=4)](https://github.com/aWuttig "aWuttig (56 commits)")[![EvilBMP](https://avatars.githubusercontent.com/u/540478?v=4)](https://github.com/EvilBMP "EvilBMP (3 commits)")[![mmunz](https://avatars.githubusercontent.com/u/3017481?v=4)](https://github.com/mmunz "mmunz (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/portrino-codeception-helper-module/health.svg)

```
[![Health](https://phpackages.com/badges/portrino-codeception-helper-module/health.svg)](https://phpackages.com/packages/portrino-codeception-helper-module)
```

###  Alternatives

[vimeo/psalm

A static analysis tool for finding errors in PHP applications

5.8k77.5M6.7k](/packages/vimeo-psalm)[phan/phan

A static analyzer for PHP

5.6k11.2M1.1k](/packages/phan-phan)[orchestra/testbench

Laravel Testing Helper for Packages Development

2.2k39.1M32.1k](/packages/orchestra-testbench)[magento/magento2-functional-testing-framework

Magento2 Functional Testing Framework

15511.5M30](/packages/magento-magento2-functional-testing-framework)[pact-foundation/pact-php

Enables consumer driven contract testing, following the PACT foundation principles.

2971.7M32](/packages/pact-foundation-pact-php)[orchestra/workbench

Workbench Companion for Laravel Packages Development

8017.0M43](/packages/orchestra-workbench)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
