{"id":18948402,"url":"https://github.com/oxid-esales/testing_library","last_synced_at":"2025-04-05T03:10:54.807Z","repository":{"id":24762819,"uuid":"28175906","full_name":"OXID-eSales/testing_library","owner":"OXID-eSales","description":"OXID eShop Testing Library DEPRECATED","archived":false,"fork":false,"pushed_at":"2024-10-10T13:58:58.000Z","size":3841,"stargazers_count":13,"open_issues_count":0,"forks_count":21,"subscribers_count":30,"default_branch":"b-8.0.x","last_synced_at":"2025-03-29T02:07:36.552Z","etag":null,"topics":["developer-tools","oxid-esales","php","tool"],"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/OXID-eSales.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","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":"2014-12-18T08:59:20.000Z","updated_at":"2023-01-21T15:48:03.000Z","dependencies_parsed_at":"2023-02-13T21:45:53.842Z","dependency_job_id":"6fa23227-cca6-4030-a933-a1e33dcb64ab","html_url":"https://github.com/OXID-eSales/testing_library","commit_stats":{"total_commits":851,"total_committers":46,"mean_commits":18.5,"dds":0.6603995299647474,"last_synced_commit":"102690019713d90b75e0721dc98e56d43af70252"},"previous_names":[],"tags_count":82,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OXID-eSales%2Ftesting_library","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OXID-eSales%2Ftesting_library/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OXID-eSales%2Ftesting_library/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OXID-eSales%2Ftesting_library/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OXID-eSales","download_url":"https://codeload.github.com/OXID-eSales/testing_library/tar.gz/refs/heads/b-8.0.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247280272,"owners_count":20912967,"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":["developer-tools","oxid-esales","php","tool"],"created_at":"2024-11-08T13:13:27.463Z","updated_at":"2025-04-05T03:10:54.793Z","avatar_url":"https://github.com/OXID-eSales.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"OXID eShop Testing Library\n==========================\n\n.. image:: https://img.shields.io/packagist/v/oxid-esales/testing-library.svg?maxAge=3600\n    :target: https://packagist.org/packages/oxid-esales/testing-library\n\nWarning! Testing library is deprecated. Please use native PHPUnit for testing.\n\nThe OXID eShop testing library can be used to test OXID eShop with\nexisting or new Unit, Integration, Mink or QUnit tests. Furthermore, it\ncan also be very helpful to developers who create a module for the OXID\neShop.\n\nThis library is meant to help developers check their shop/module code\nwith ease. It contains all the required tools and dependencies to\nexecute unit tests, selenium tests, metrics.\n\nRequirements\n------------\n\n-  Latest Composer version\n-  PHP cURL extension\n-  Not compatible with Windows (use VM instead)\n\nThis library can be used to test modules with earlier shop versions, but\nit will not be possible to run shop tests.\n\nInstallation\n------------\n\nTesting library setup uses composer to get required packages, so make\nsure to have composer installed and accessible. You can find composer\ninstallation guide `here \u003chttps://getcomposer.org/download/\u003e`__.\n\nSelecting where to install testing library\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nTesting library can be installed directly within shop or to any other\ndirectory. However, installation varies slightly depending on selected\nlocation. We advise to install it using shop directory.\n\nOption 1: Selecting shop directory for installation (preferred way)\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nTo install testing library within shop directory, update/create\n``composer.json`` with following values:\n\n.. code:: json\n\n    {\n        \"name\": \"oxid-esales/eshop\",\n        \"description\": \"OXID eShop\",\n        \"type\": \"project\",\n        \"keywords\": [\"oxid\", \"modules\", \"eShop\"],\n        \"homepage\": \"https://www.oxid-esales.com/en/home.html\",\n        \"license\": [\n            \"GPL-3.0\",\n            \"proprietary\"\n        ],\n        \"require-dev\": {\n            \"oxid-esales/testing-library\": \"dev-master\",\n            \"incenteev/composer-parameter-handler\": \"~2.0\"\n        },\n        \"minimum-stability\": \"dev\",\n        \"prefer-stable\": true,\n        \"scripts\": {\n            \"post-install-cmd\": [\n                \"Incenteev\\\\ParameterHandler\\\\ScriptHandler::buildParameters\"\n            ],\n            \"post-update-cmd\": [\n                \"Incenteev\\\\ParameterHandler\\\\ScriptHandler::buildParameters\"\n            ]\n        },\n        \"extra\": {\n            \"incenteev-parameters\": {\n                \"file\": \"test_config.yml\",\n                \"dist-file\": \"vendor/oxid-esales/testing-library/test_config.yml.dist\",\n                \"parameter-key\": \"mandatory_parameters\",\n                \"env-map\": {\n                    \"shop_path\": \"SHOP_PATH\",\n                    \"shop_tests_path\": \"SHOP_TESTS_PATH\",\n                    \"module_ids\": \"MODULE_IDS\"\n                }\n            }\n        }\n    }\n\nInstalling this way, binaries will be accessible from\n``shop_source_path/vendor/bin``. Latest development shop version already\nincludes composer.json file in its source, so no changes need to be\nmade.\n\nOption 2: Selecting any directory for installation (alternative way)\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nTo install testing library to any directory, you need to checkout\ntesting library from Github into desired directory\n(``git clone https://github.com/OXID-eSales/testing_library``).\nInstalling this way, binaries will be accessible from\n``testing_library/bin``.\n\nInstalling testing library\n~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nAfter you selected where you want to install the testing library, follow\nthese steps:\n\n1. Navigate to the directory that you picked for installation.\n2. Use composer to setup testing library components\n   (``composer install``). Ensure you do this from within the directory\n   where ``composer.json`` is located. During setup you will be asked\n   several questions regarding testing library configuration. These\n   options will be explained in more detail here: `Parameter\n   explanation \u003cREADME.md#configuration\u003e`__\n\nRunning tests\n-------------\n\nFirst and foremost - make sure you have a working shop, meaning:\n\n1. Shop is installed/configured (``config.inc.php`` is filled in with\n   database connection details and so)\n2. Shop can be accessed through url (used for shop installation).\n\nSeveral test runners are available for use once testing library is prepared.\nThese are available in ``bin`` or ``vendor/bin`` directory:\n\n* ``runtests`` - run shop/module unit and integration tests.\n* ``runtests-selenium`` - run shop/module selenium tests.\n* ``runmetrics`` - execute code metrics test for shop/module.\n\nAdditionally you can pass parameters to these scripts. ``runmetrics``\nuses ``pdepend``, and all ``runtests`` uses ``phpunit``. You can add\n``phpunit`` parameters to ``runtests``, ``runtests-selenium``.\nYou can add ``pdepend`` parameters to\n``runmetrics``. To see which additional options can be passed to test\nrunner, add ``--help`` option to the command (i.e.\n``./runtests --help``, ``./runmetrics --help``). This will show\navailable options for desired tool.\n\nSome usage examples:\n\n1. Running only a single file tests -\n   ``bin/runtests path/to/test/fileTest.php``\n2. Running only specific pattern matching tests from specified file -\n   ``bin/runtests --filter match_pattern path/to/test/fileTest.php``\n3. Running one or multiple test suites -\n   ``TEST_DIRS=unit,integration bin/runtests``\n\nOne thing to note when adding parameters to these tools - always provide\nfile/folder at the end as it will no longer be picked automatically. Use\nAllTestsUnit or AllTestsSelenium respectively to run all tests.\n\nRun with PHPStorm\n~~~~~~~~~~~~~~~~~\n\nYou need to setup path to bootstrap and configuration file in order to run tests with PHPStorm.\n\n1. Open PHPStorm.\n2. Open Run/Debug configurations window.\n3. Press on configuration icon (wrench) right after the \"Use alternative\n   configuration file\" input.\n4. New PHPUnit window pops up. Check \"Default bootstrap file\" and \"Default configuration file\" checkbox\n   and choose paths to bootstrap and configuration file.\n   Path to bootstrap:\n   {source}/vendor/oxid-esales/testing-library/bootstrap.php\n   Path to the configuration file:\n   {source}/vendor/oxid-esales/testing-library/phpunit.xml\n\nConfiguration\n-------------\n\nConfiguration file is named ``test_config.yml`` and is placed in the\nroot directory of this library or shop (when installing with shop\ncomposer.json). During setup you will be asked several questions\nregarding testing library and shop/module installation. After setup\n``test_config.yml`` will be created, and later can be edited if some\nconfiguration values need to be changed.\n\nAll of the parameters can be set with environmental variables.\nEnvironmental parameter names are the same as in the configuration file,\nbut should be all uppercase: *shop\\_path* =\u003e *SHOP\\_PATH*,\n*browser\\_name* =\u003e *BROWSER\\_NAME*, etc.\n\nConfiguration parameters\n~~~~~~~~~~~~~~~~~~~~~~~~\n\nMandatory parameters\n^^^^^^^^^^^^^^^^^^^^\n\nThese parameters are required for testing library to work properly.\n\n+------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n| Parameter name               | Description                                                                                                                                                                                                                                                                                                                                                           |\n+==============================+=======================================================================================================================================================================================================================================================================================================================================================================+\n| **shop\\_path**               | Path to eShop source. Defaults to the same directory as to where vendor is located. Supports relative and absolute paths. Can be left empty when installed from shop or module directory.                                                                                                                                                                             |\n+------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n| **shop\\_tests\\_path**        | Path to eShop tests. If shop resides in ``/var/www/shop/source`` and tests are in ``/var/www/shop/tests``, this should be set to ``../tests``. Supports relative and absolute paths.                                                                                                                                                                                  |\n+------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n| **module_ids**               | When testing installed modules, specify the module id within shop. Multiple module ids can be specified separated by comma: 'module1_id,module2_id,module3_id'. If no modules will be tested, leave this field empty or ``null``. Default ``null``                                                                                                                    |\n+------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n\nOptional parameters\n^^^^^^^^^^^^^^^^^^^\n\nThese parameters are not required in order to work, but they provide\nadditional functionality and options when testing.\n\n+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n| Parameter name                           | Description                                                                                                                                                                                                                                                                                             |\n+==========================================+=========================================================================================================================================================================================================================================================================================================+\n| **shop\\_url**                            | eShop base url (if not set, takes it from shop's config.inc.php file). Default ``null``.                                                                                                                                                                                                                |\n+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n| **shop\\_serial**                         | For PE and EE editions shop serial has to be specified for shop installer to work. Default ``''``.                                                                                                                                                                                                      |\n+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n| **enable\\_varnish**                      | Run tests with varnish on or off. Shop has to be configured to work with varnish, correct serial must be used. Default ``false``                                                                                                                                                                        |\n+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n| **is\\_subshop**                          | Whether to run subshop tests. Currently only used when running selenium tests. Default ``false``.                                                                                                                                                                                                       |\n+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n| **install\\_shop**                        | Whether to prepare shop database for testing. Shop ``config.ing.php`` file must be correct. Default ``true``.                                                                                                                                                                                           |\n+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n| **remote\\_server\\_dir**                  | If defined, testing services will be copied to this directory and called via url instead of used locally. Example: username@server.com:/path/to/shop.                                                                                                                                                   |\n+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n| **shop\\_setup\\_path**                    | eShop setup directory. After setting up the shop, setup directory will be deleted. For shop installation to work during tests run, path to this directory must be specified. If not set, uses default (i.e. shop dir ``/var/www/eshop/source/``, default setup dir ``/var/www/eshop/source/setup`` ).   |\n+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n| **restore\\_shop\\_after\\_tests\\_suite**   | Whether to restore shop data after running all tests. If this is set to false, shop will be left with tests data added on it. Default ``false``.                                                                                                                                                        |\n+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n| **restore\\_after\\_acceptance\\_tests**    | Whether to dump and restore the database after a single acceptance test.                                                      Default ``true``.                                                                                                                                                         |\n+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n| **restore\\_after\\_unit\\_tests**          | Whether to dump and restore the database after all tests are finished in a single unit, integration test suite.               Default ``true``.                                                                                                                                                         |\n+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n| **test\\_database\\_name**                 | If specified, this database is used instead of real one for unit and integration tests                                                                                                                                                                                                                  |\n+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n| **tmp\\_path**                            | If php has no write access to /tmp folder, provide alternative temp folder for tests.                                                                                                                                                                                                                   |\n+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n| **database\\_restoration\\_class**         | Currently exists ``DatabaseRestorer`` and ``LocalDatabaseRestorer``. ``LocalDatabaseRestorer`` - is faster, but does not work with remote databases, ``DatabaseRestorer`` - can be used with external database. Default ``DatabaseRestorer``.                                                           |\n+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n| **activate\\_all\\_modules**               | Whether to activate all modules defined in modules\\_path when running tests. Normally only tested module is activated during test run. Modules will be activated in the specified order. Default ``false``.                                                                                             |\n+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n| **run\\_tests\\_for\\_shop**                | Whether to run shop unit tests. This applies only when correct shop\\_tests\\_path are set. Default ``true``.                                                                                                                                                                                             |\n+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n| **run\\_tests\\_for\\_modules**             | Whether to run modules unit tests. All modules provided in modules\\_path will be tested. If shop\\_tests\\_path and run\\_shop\\_tests are set, shop tests will be run with module tests. Default ``true``.                                                                                                 |\n+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n| **screen\\_shots\\_path**                  | Folder where to save selenium screen shots. If not specified, screenshots will not be taken. Default ``null``. Default ``false``.                                                                                                                                                                       |\n+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n| **screen\\_shots\\_url**                   | Url, where selenium screen shots should be available. Default ``null``.                                                                                                                                                                                                                                 |\n+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n| **browser\\_name**                        | Browser name which will be used for acceptance testing. Possible values: ``*iexplore, *iehta, *firefox, *chrome, *piiexplore, *pifirefox, *safari, *opera``. make sure that path to browser executable is known for the system. Default ``firefox``.                                                    |\n+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n| **selenium\\_server\\_ip**                 | Selenium server IP address. Used to connect to selenium server when Mink selenium driver is used for acceptance tests. Default ``127.0.0.1``.                                                                                                                                                           |\n+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n| **additional\\_test\\_paths**              | Used for running additional tests. It's possible to add paths separated by comma. Loads tests in same manner as eShop or modules tests.                                                                                                                                                                 |\n+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n| **retry\\_times\\_after\\_test\\_fail**      | How many times to try test before marking it as failure. Could be used for unstable tests which fails randomly.                                                                                                                                                                                         |\n+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n\nChanging PHPUnit parameters\n~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nTo change PHPUnit parameters, add phpunit.xml file inside tests\ndirectory and it will be used.\n\nExecution before UNIT test run with additional.inc.php\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nTesting library gives possibility to make some actions before UNIT test run.\nSo if there is a need to to do that, add additional.inc.php file into\ntests directory and it will be executed.\n\n**Note:**\n\n  Use addTestData() method and testSql directory to change environment for Acceptance tests.\n  Read more in a section Writing acceptance tests.\n\nWriting Tests\n-------------\n\nDirectory Structure\n~~~~~~~~~~~~~~~~~~~\n\nModule tests should be placed in module root directory:\n``path/to/shop/modules/my_module/tests``. Tests can by placed in three\ndirectories: unit, integration and acceptance depending on tests type.\n``./runtests`` collects tests from unit and integration directories,\nwhile ``./runtests-selenium`` - from acceptance. Code coverage is\ncalculated from both unit and integration tests.\n\nWriting unit and integration tests\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nUnit and integration should be placed under ``tests/unit`` and\n``tests/integration`` directories. Any number of subdirectories can be\ncreated inside - all tests will be collected. Unit and integration tests\nshould extend ``OxidEsales\\TestingLibrary\\UnitTestCase`` class so that\ndatabase, registry, configuration parameters restoration, module\nactivation would work. If unit tests are not relying on database or\nregistry and are real clean unit tests, ``PHPUnit\\Framework\\TestCase``\nclass can be extended, but have in mind that autoloading of module\nclasses and correct shop classes extension will not work. All\npreparation works can be done in ``additional.inc.php`` file. This file\nis loaded before database dump creation and before running any of the\ntest, so can be used autoloaders registration, demodata preparation,\netc. For unit testing shop is installed without default demodata added.\n\nMethods usage\n^^^^^^^^^^^^^\n\nRun unit and integration test dependent if Subshops is enabled:\n\n.. code:: php\n\n    public function testCase_forSubShops()\n    {\n        $this-\u003emarkTestSkippedIfSubShop();\n        ...\n    }\n\n    public function testCase_forNoSubShops()\n    {\n        $this-\u003emarkTestSkippedIfNoSubShop();\n        ...\n    }\n\nRest of the methods can be found in class: ``OxidEsales\\TestingLibrary\\UnitTestCase``.\n\nWriting acceptance tests\n~~~~~~~~~~~~~~~~~~~~~~~~\n\nCurrently for acceptance testing Mink library and selenium driver is used.\n\n**Note:**\n\n  selenium-server-standalone-jar 2.47.1 is used for testing.\n  There might be some issues with older versions `issue #13 \u003chttps://github.com/OXID-eSales/testing_library/issues/13\u003e`__\n\nAcceptance tests should be placed under\n``tests/acceptance`` directory and extend\n``OxidEsales\\TestingLibrary\\AcceptanceTestCase``.\n\nTested module will be activated by default.\nSome data might be also added by extending\n``AcceptanceTestCase::addTestData()`` method and activating module\nmanually. This method will be run before any test and before database\ndump creation, once per tests suite.\n\nFor acceptance testing\nshop is installed with default demodata. Additional demodata can be\nadded to ``testSql`` directory by the name of ``demodata_EE.sql``,\n``demodata_PE_CE.sql`` or ``demodata_EE_mall.sql`` (when subshop\nfunctionality is enabled in test\\_config). These files will be loaded on\ntop of the database depending on the shop edition. Any additional files,\nneeded for testing can be placed under ``testData`` directory - all\ncontent will be copied onto the shop source before running tests.\n\nA useful method for preparing the shop is\n``AcceptanceTestCase::callShopSC()``. With this method\nyou can e.g. insert a new article or modify config variables. For detailed\nusage examples have a look at the OXID eShop acceptance tests.\n\nMethods usage\n^^^^^^^^^^^^^\n\nTesting library provides methods which allows write tests easier. Some methods usages are described bellow:\n\nActivating theme:\n\n.. code:: php\n\n    // This will activate azure theme.\n    $this-\u003eactivateTheme('azure');\n\nAdd article to basket:\n\n.. code:: php\n\n    // This will add article with ID 1001 to basket.\n    $this-\u003eaddToBasket(\"1001\");\n\nUpdate items amount in basket: *(Note that item must be in basket in order to change it)*\n\n.. code:: php\n\n    // This will update article with ID 1001 in basket to have 2 items.\n    $this-\u003echangeBasket(\"1001\", 2);\n\n.. code:: php\n\n    // This will remove an item from basket.\n    $this-\u003echangeBasket(\"1001\", 0);\n\nLogin user in front end side:\n\n.. code:: php\n\n    $this-\u003eloginInFrontend(\"example_test@oxid-esales.dev\", \"useruser\");\n\nRest of the methods can be found in class: ``OxidEsales\\TestingLibrary\\AcceptanceTestCase``.\n\nChanging database restoration mechanism\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nCurrently there are two database restoration classes available -\n``DatabaseRestorer`` and ``LocalDatabaseRestorer``. Both of these are\ntruncating changed tables and adding all the information back in. If\nprovided solutions are not fitting your needs, it can be changed by\nimplementing\n``OxidEsales\\TestingLibrary\\DatabaseRestorer\\DatabaseRestorerInterface``\ninterface and registering new class in\n``test_config.yml::database_restoration_class``.\n\nLibrary API\n~~~~~~~~~~~\n\n- ``test_config.yml`` parameters\n- ``OxidEsales\\TestingLibrary\\AcceptanceTestCase``\n- ``OxidEsales\\TestingLibrary\\UnitTestCase``\n- ``\\OxidEsales\\TestingLibrary\\ServiceCaller``\n- ``OxidEsales\\TestingLibrary\\Services`` called via ``\\OxidEsales\\TestingLibrary\\ServiceCaller``\n\nTesting library branch names\n----------------------------\n\nTesting library branch names follow the OXID eShop component branch names. Which means that branch names\ndo not follow testing library version numbers, but represent the target version of the OXID eShop compilation.\nFor example:\n\n===========   ===========================================================\nBranch Name   OXID eShop Compilation Target Version\n-----------   -----------------------------------------------------------\nb-6.2.x       v6.2.*  (Next patch release of OXID eShop compilation v6.2)\nb-6.3.x       v6.3.*  (Next patch release of OXID eShop compilation v6.3)\nmaster        OXID eShop compilation master branch\n===========   ===========================================================\n\nTests running workflow\n----------------------\n\nGraphically visualized workflow can be found in workflow.puml. This file can be opened with tool called PlantUml (http://plantuml.com/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foxid-esales%2Ftesting_library","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foxid-esales%2Ftesting_library","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foxid-esales%2Ftesting_library/lists"}