{"id":20213786,"url":"https://github.com/dachcom-digital/pimcore-codeception-framework","last_synced_at":"2025-04-10T13:54:55.394Z","repository":{"id":51506697,"uuid":"326430014","full_name":"dachcom-digital/pimcore-codeception-framework","owner":"dachcom-digital","description":null,"archived":false,"fork":false,"pushed_at":"2024-12-05T13:50:58.000Z","size":273,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":10,"default_branch":"3.0","last_synced_at":"2025-03-24T12:39:33.473Z","etag":null,"topics":["bundles","codeception","pimcore","testing"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dachcom-digital.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-01-03T14:47:34.000Z","updated_at":"2024-12-05T13:50:59.000Z","dependencies_parsed_at":"2023-02-10T10:00:37.854Z","dependency_job_id":"f8c94c07-98ee-4ae2-8916-62368953cd81","html_url":"https://github.com/dachcom-digital/pimcore-codeception-framework","commit_stats":{"total_commits":80,"total_committers":2,"mean_commits":40.0,"dds":"0.025000000000000022","last_synced_commit":"200b98b9a598e3651202de0c3e2d8c6c679382df"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dachcom-digital%2Fpimcore-codeception-framework","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dachcom-digital%2Fpimcore-codeception-framework/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dachcom-digital%2Fpimcore-codeception-framework/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dachcom-digital%2Fpimcore-codeception-framework/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dachcom-digital","download_url":"https://codeload.github.com/dachcom-digital/pimcore-codeception-framework/tar.gz/refs/heads/3.0","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248088414,"owners_count":21045710,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bundles","codeception","pimcore","testing"],"created_at":"2024-11-14T06:11:43.948Z","updated_at":"2025-04-10T13:54:55.386Z","avatar_url":"https://github.com/dachcom-digital.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pimcore Codeception Framework\n[![Software License](https://img.shields.io/badge/license-GPLv3-brightgreen.svg?style=flat-square)](LICENSE.md)\n[![Software License](https://img.shields.io/badge/license-DCL-white.svg?style=flat-square\u0026color=%23ff5c5c)](LICENSE.md)\n\nThis Package allows you to create fast and simple testing environments. \nIt's also used by all pimcore Bundles created by [DACHCOM.DIGITAL](https://github.com/dachcom-digital?q=pimcore-).\n\n### Support Table\n\n| Branch  | Supported Pimcore Versions | Supported Symfony Versions |\n|---------|----------------------------|----------------------------|\n| **3.0** | `11.0`                     | `^6.2`                     |\n| **2.0** | `10.1`- `10.6`             | `^5.4`                     |\n| **1.0** | `6.6` - `6.9`              | `^4.4`, `^3.4`             |\n\n### Upgrade Notes\n#### 3.0.0\n- Yaml extension changed from `yml` to `yaml`\n- `_support` path has changed to `Support`. All `Dachcom\\Codeception\\*` namespaces have changed to `Dachcom\\Codeception\\Support\\*`\n- Using rsync for `setup_files` so you need to adjust your `setup_files` stack accordingly (see example below)\n- You need to define PIMCORE `config_location` in your ci configuration (See section \"Configuration Location\" below)\n- You have to add additional PIMCORE Bundles to the `bundles` config section (see example below)\n- [SECURITY] `\\Pimcore\\Bundle\\AdminBundle\\EventListener\\CsrfProtectionListener` is disabled while executing tests\n- `Pimcore\\Model\\DataObject` namespace changed from `_output/var/classes/DataObject/DataObject` to `_output/var/classes/DataObject`\n- TestKernel Class can be defined via `TEST_KERNEL_CLASS` env var\n\n***\n\n## Configuration\nAll test files need to be stored in `/tests`.\n\n### Environment Variables\n\n| Name                            | Example                                                 | Required | Description                                                                    |\n|---------------------------------|---------------------------------------------------------|----------|--------------------------------------------------------------------------------|\n| `TEST_BUNDLE_NAME`              | `ToolboxBundle`                                         | yes      | --                                                                             |\n| `TEST_BUNDLE_INSTALLER_CLASS`   | `ToolboxBundle\\\\Tool\\\\Install`                          | yes      | Set to `false` if you don't have any installer class                           |\n| `TEST_BUNDLE_TEST_DIR`          | `${{ github.workspace }}/tests`                         | yes      | --                                                                             |\n| `TEST_PROJECT_ROOT_DIR`         | `${{ github.workspace }}`                               | yes      | This variable is required to setup test structure before any system is running |\n| `PIMCORE_CODECEPTION_FRAMEWORK` | `${{ github.workspace }}/pimcore-codeception-framework` | yes      | --                                                                             |\n| `PIMCORE_CODECEPTION_VERSION`   | `2.0`, `1.0`                                            | yes      | --                                                                             |\n\n## Bootstrap\nCreate a file called `_bootstrap.php` in `tests/_bootstrap.php`\n\n```php\n\u003c?php\n\n$frameworkPath = getenv('PIMCORE_CODECEPTION_FRAMEWORK');\n$bundleTestPath = getenv('TEST_BUNDLE_TEST_DIR');\n\n$bootstrap = sprintf('%s/src/_bootstrap.php', $frameworkPath);\n\ninclude_once $bootstrap;\n```\n\n## Setup File\nCreate a file called `config.yaml` in `tests/_etc/config.yaml`.\n\n```yaml\nbundles:\n    - { namespace: \\MyTestBundle\\MyTestBundle }\n    - { namespace: \\Pimcore\\Bundle\\SeoBundle\\PimcoreSeoBundle, priority: 0, execute_installer: true } # if you need the seo bundle\nsetup_files:\n    - { path: app/config.yaml, dest: ./config/ }\n    - { path: app/system_settings.yaml, dest: ./var/config/system_settings/ }\n    - { path: app/controller/DefaultController.php, dest: ./src/Controller/ }\n    - { path: app/templates/default.html.twig, dest: ./templates/default/ }\n    - { path: app/templates/snippet.html.twig, dest: ./templates/default/ }\npreload_files:\n    - { path: Services/MySpecialTestService.php }\nadditional_composer_packages:\n    - { package: pimcore/admin-ui-classic-bundle, version: ^1.0 } # this one is most likely needed\n    - { package: vendor/foo-bar, version: ^1.0}                   # additional packages\n```\n### Configuration Location\nIn your `app/config.yaml` you should move all config locations to `settings-store`,\nsee pimcore ci [example](https://github.com/pimcore/pimcore/blob/11.x/.github/ci/files/config/config.yaml)\n\n\u003e Attention! Do not set `system_settings` to `settings-store`!\n\n### Setup File Parameters\n- **bundles** _(required)_: At least your test bundle should be registered here. Add more, if needed\n- **setup_files** _(optional)_: All your template files which should to be available during test cycles. These files need to be\n  stored under `/tests/_etc/config`\n- **preload_files** _(optional)_: These files will be included at kernel setup. Since these files are not included via composer\n  autoload, we need to define them here\n- **additional_composer_packages** _(optional)_: Install additional composer packages which are not available in root\n  composer.json\n\n## Bundle Configuration Files\nThis Framework allows you to use multiple (bundle) configuration setups. You need to add at least one default config file\ncalled `default_config.yaml` and store it in `/tests/_etc/config/bundle`.\n\n### Using Bundle Configuration Files\nTBD\n\n## Classes\nIf you want to provide some classes to install, all the definitions need to stored at `/tests/_etc/classes`.\n\n***\n\n## Actors\n\n### [MODULE] PimcoreAdminCsv\n\n| Name                                                     | Description |\n|----------------------------------------------------------|-------------|\n| `$I-\u003eseeResponseCsvHeaderHasValues(array $headerValues)` |             |\n| `$I-\u003eseeResponseCsvRowValues(int $index, array $values)` |             |\n| `$I-\u003eseeResponseCsvLength(int $length)`                  |             |\n| `$I-\u003eseeResponseIsCsv()`                                 |             |\n\n### [MODULE] PimcoreAdminJson\n\n| Name                                            | Description |\n|-------------------------------------------------|-------------|\n| `$I-\u003eseeResponseContainsJson(array $json = [])` |             |\n| `$I-\u003eseeResponseIsJson()`                       |             |\n\n### [MODULE] PimcoreBackend\n\n| Name                                                                                                                                   | Description |\n|----------------------------------------------------------------------------------------------------------------------------------------|-------------|\n| `$I-\u003ehaveAPageDocument($key = 'bundle-page-test', array $params = [], $locale = null)`                                                 |             |\n| `$I-\u003ehaveASubPageDocument(Document $parent, $key = 'bundle-sub-page-test', array $params = [], $locale = null)`                        |             |\n| `$I-\u003ehaveTwoConnectedDocuments(Document\\Page $sourceDocument, Document\\Page $targetDocument)`                                          |             |\n| `$I-\u003ehaveAUnPublishedDocument(Document $document)`                                                                                     |             |\n| `$I-\u003emoveDocument(Document $document, Document $parentDocument)`                                                                       |             |\n| `$I-\u003ehaveASnippet($key = 'bundle-snippet-test', $params = [], $locale = null)`                                                         |             |\n| `$I-\u003ehaveAEmail($key = 'bundle-email-test', array $params = [], $locale = null)`                                                       |             |\n| `$I-\u003ehaveALink(Document\\Page $source, $key = 'bundle-link-test', array $params = [], $locale = null)`                                  |             |\n| `$I-\u003ehaveASubLink(Document $parent, Document\\Page $source, $key = 'bundle-sub-link-test', array $params = [], $locale = null)`         |             |\n| `$I-\u003ehaveAHardLink(Document\\Page $source, $key = 'bundle-hardlink-test', array $params = [], $locale = null)`                          |             |\n| `$I-\u003ehaveASubHardLink(Document $parent, Document\\Page $source, $key = 'bundle-sub-hardlink-test', array $params = [], $locale = null)` |             |\n| `$I-\u003ehaveAPimcoreObject(string $objectType, $key = 'bundle-object-test', array $params = [])`                                          |             |\n| `$I-\u003ehaveASubPimcoreObject(DataObject $parent, string $objectType, $key = 'bundle-sub-object-test', array $params = [])`               |             |\n| `$I-\u003erefreshObject(DataObject $object)`                                                                                                |             |\n| `$I-\u003emoveObject(DataObject $object, DataObject $parentObject)`                                                                         |             |\n| `$I-\u003ecopyObject(DataObject $object, DataObject $targetObject)`                                                                         |             |\n| `$I-\u003ecreateNewObjectVersion(DataObject\\Concrete $object)`                                                                              |             |\n| `$I-\u003edeleteObjectVersion(Version $version)`                                                                                            |             |\n| `$I-\u003epublishObjectVersion(Version $version)`                                                                                           |             |\n| `$I-\u003emoveObjectToRecycleBin(DataObject $object)`                                                                                       |             |\n| `$I-\u003erestoreObjectFromRecycleBin(DataObject $object, Item $item)`                                                                      |             |\n| `$I-\u003ehaveAPimcoreObjectFolder($key = 'bundle-object-folder-test', array $params = [])`                                                 |             |\n| `$I-\u003ehaveAPimcoreAsset($key = 'bundle-asset-test', array $params = [])`                                                                |             |\n| `$I-\u003ehaveASubPimcoreAsset(Asset\\Folder $parent, $key = 'bundle-sub-asset-test', array $params = [])`                                   |             |\n| `$I-\u003ehaveAPimcoreAssetFolder($key = 'bundle-asset-folder-test', array $params = [])`                                                   |             |\n| `$I-\u003ehaveASubPimcoreAssetFolder(Asset\\Folder $parent, $key = 'bundle-asset-sub-folder-test', array $params = [])`                      |             |\n| `$I-\u003emoveAsset(Asset $asset, Asset $parentAsset)`                                                                                      |             |\n| `$I-\u003ehaveADummyFile($fileName, $fileSizeInMb = 1)`                                                                                     |             |\n| `$I-\u003ehaveASite($siteKey, array $params = [], $locale = null, $add3w = false, $additionalDomains = [], array $errorDocuments = [])`     |             |\n| `$I-\u003ehaveAPageDocumentForSite(Site $site, $key = 'document-test', array $params = [], $locale = null)`                                 |             |\n| `$I-\u003ehaveAHardlinkForSite(Site $site, Document\\Page $document, $key = 'hardlink-test', array $params = [], $locale = null)`            |             |\n| `$I-\u003eseeDownload($fileName)`                                                                                                           |             |\n| `$I-\u003eseeEditablesPlacedOnDocument(Document $document, array $editables)`                                                               |             |\n| `$I-\u003eseeAnAreaElementPlacedOnDocument(Document $document, string $areaName, array $editables = [])`                                    |             |\n| `$I-\u003eseeEmailIsSent(Document\\Email $email)`                                                                                            |             |\n| `$I-\u003eseeEmailIsNotSent(Document\\Email $email)`                                                                                         |             |\n| `$I-\u003eseePropertiesInEmail(Document\\Email $mail, array $properties)`                                                                    |             |\n| `$I-\u003eseePropertyKeysInEmail(Document\\Email $mail, array $properties)`                                                                  |             |\n| `$I-\u003ecantSeePropertyKeysInEmail(Document\\Email $mail, array $properties)`                                                              |             |\n| `$I-\u003eseeInRenderedEmailBody(Document\\Email $mail, string $string)`                                                                     |             |\n| `$I-\u003eseeKeyInFrontendTranslations(string $key)`                                                                                        |             |\n| `$I-\u003ehaveAFrontendTranslatedKey(string $key, string $translation, string $language)`                                                   |             |\n| `$I-\u003ehaveAStaticRoute(string $name = 'test_route', array $params = [])`                                                                |             |\n| `$I-\u003ehaveAPimcoreRedirect(array $data)`                                                                                                |             |\n| `$I-\u003ehaveAPimcoreClass(string $name = 'TestClass')`                                                                                    |             |\n| `$I-\u003esubmitDocumentToXliffExporter(Document $document)`                                                                                |             |\n\n### [MODULE] PimcoreBundleCore\n\n| Name                                                                     | Description |\n|--------------------------------------------------------------------------|-------------|\n| This module installs a bundle if `run_installer` option is set to `true` |             |\n\n### [MODULE] PimcoreCore\n\n| Name                                                                        | Description |\n|-----------------------------------------------------------------------------|-------------|\n| `$I-\u003ehaveABootedSymfonyConfiguration(string $configuration)`                |             |\n| `$I-\u003ehaveAKernelWithoutDebugMode()`                                         |             |\n| `$I-\u003eseeException(string $exception, ?string $message, \\Closure $callback)` |             |\n\n### [MODULE] PimcoreUser\n\n| Name                                      | Description |\n|-------------------------------------------|-------------|\n| `$I-\u003ehaveAUser($username)`                |             |\n| `$I-\u003ehaveAUserWithAdminRights($username)` |             |\n\n***\n\n### [MODULE] Browser/PhpBrowser\n\n| Name                                                                                                                        | Description |\n|-----------------------------------------------------------------------------------------------------------------------------|-------------|\n| `$I-\u003ehaveReplacedPimcoreRuntimeConfigurationNode(array $overrideConfig)`                                                    |             |\n| `$I-\u003eamOnPageInEditMode(string $page)`                                                                                      |             |\n| `$I-\u003eamOnPageWithLocale(string $url, null string array $locale)`                                                            |             |\n| `$I-\u003eamOnPageWithLocaleAndCountry(string $url, ?string $locale, string $country)`                                           |             |\n| `$I-\u003eseeDownloadLink(AbstractModel $element, string $link)`                                                                 |             |\n| `$I-\u003eseeDownloadLinkZip(string $fileName, string $link)`                                                                    |             |\n| `$I-\u003eamOnStaticRoute(string $routeName, array $args)`                                                                       |             |\n| `$I-\u003eseeCurrentHostEquals(string $host)`                                                                                    |             |\n| `$I-\u003eseeAEditableConfiguration(string $name, string $type, ?string $label, array $options, $data = null, $selector = null)` |             |\n| `$I-\u003eseeEmailIsSentTo(string $recipient, Email $email)`                                                                     |             |\n| `$I-\u003eseeSentEmailHasPropertyValue(Email $email, string $property, string $value)`                                           |             |\n| `$I-\u003eseeSentEmailHasHeaderValue(Email $email, string $property, string $value)`                                             |             |\n| `$I-\u003eseeEmailSubmissionType(string $submissionType, string $type, Email $email)`                                            |             |\n| `$I-\u003eseeEmptyEmailSubmissionType(string $type, Email $email)`                                                               |             |\n| `$I-\u003eseeInSubmittedEmailBody(string $string, Email $email)`                                                                 |             |\n| `$I-\u003edontSeeInSubmittedEmailBody(string $string, Email $email)`                                                             |             |\n| `$I-\u003eseeInSubmittedEmailBodyOfType(string $string, string $type, Email $email)`                                             |             |\n| `$I-\u003edontSeeInSubmittedEmailBodyOfType(string $string, string $type, Email $email)`                                         |             |\n| `$I-\u003eamLoggedInAsFrontendUser(?UserInterface $user, string $firewallName)`                                                  |             |\n| `$I-\u003eamLoggedInAs(string $username)`                                                                                        |             |\n| `$I-\u003esendTokenAjaxPostRequest(string $url, array $params = [])`                                                             |             |\n| `$I-\u003eseeLastRequestIsInPath(string $expectedPath)`                                                                          |             |\n| `$I-\u003eseeCanonicalLinkInResponse()`                                                                                          |             |\n| `$I-\u003edontSeeCanonicalLinkInResponse()`                                                                                      |             |\n| `$I-\u003eseePimcoreOutputCacheDisabledHeader(string $disabledReasonMessage)`                                                    |             |\n| `$I-\u003edontSeePimcoreOutputCacheDisabledHeader()`                                                                             |             |\n| `$I-\u003eseePimcoreOutputCacheDate()`                                                                                           |             |\n| `$I-\u003eseeEmptySessionBag(string $bagName)`                                                                                   |             |\n| `$I-\u003eseePropertiesInLastFragmentRequest(array $properties = [])`                                                            |             |\n\n### [MODULE] Browser/WebDriver\n\n| Name                                                                                                                        | Description |\n|-----------------------------------------------------------------------------------------------------------------------------|-------------|\n| `$I-\u003eamOnPageInEditMode(string $page)`                                                                                      |             |\n| `$I-\u003esetDownloadPathForWebDriver($path = null)`                                                                             |             |\n| `$I-\u003eclearWebDriverCache()`                                                                                                 |             |\n| `$I-\u003eseeAEditableConfiguration(string $name, string $type, ?string $label, array $options, $data = null, $selector = null)` |             |\n| `$I-\u003esendWebDriverCommand(array $body)`                                                                                     |             |\n\n\n## License\n**DACHCOM.DIGITAL AG**, Löwenhofstrasse 15, 9424 Rheineck, Schweiz  \n[dachcom.com](https://www.dachcom.com), dcdi@dachcom.ch  \nCopyright © 2024 DACHCOM.DIGITAL. All rights reserved.  \n\nFor licensing details please visit [LICENSE.md](LICENSE.md)  ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdachcom-digital%2Fpimcore-codeception-framework","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdachcom-digital%2Fpimcore-codeception-framework","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdachcom-digital%2Fpimcore-codeception-framework/lists"}