Download the PHP package beyondit/opencart-test-suite without Composer
On this page you can find all versions of the php package beyondit/opencart-test-suite. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package opencart-test-suite
OpenCart Testing Suite
Supported OpenCart Versions
OpenCart version | opencart-test-suite version | build status |
---|---|---|
~3.0 | ~3.0 | |
~2.2.0 | ~2.2.0 | |
~2.3.0 | ~2.3.0 |
Motivation
The intend of this project is to provide a simple approach for setting up a test suite for custom OpenCart development.
Getting started from scratch
- Create a new OpenCart instance (maybe follow this guide)
- Add
opencart-test-suite
as a dependencycomposer require beyondit/opencart-test-suite --dev
- Use
composer require beyondit/opencart-test-suite:3.0 --dev
for OpenCart version 3.0 respectively - Create a
tests
folder and add respective tests (see examples below) - Add a
phpunit.xml
which includes testsuites (e.g. admin and catalog) and set an env variable to the opencart root directory (see example phpunit.xml below) - Now tests can be run via
vendor/bin/phpunit --testsuite catalog-tests
command
Our OpenCart project template might simplify setup for you.
Example of a phpunit.xml
Test Examples
Testing a Model
Testing a Controller
Testing with logged in Customers
Testing with logged in Users inside Admin
In order to test classes inside the admin folder just call your test class ending with AdminTest
e.g. ModelCatalogCategoryAdminTest
All versions of opencart-test-suite with dependencies
PHP Build Version
Package Version
Requires
php Version
>=5.4
phpunit/phpunit Version ^6.2
beyondit/opencart-extension-installer Version *
phpunit/phpunit Version ^6.2
beyondit/opencart-extension-installer Version *
The package beyondit/opencart-test-suite contains the following files
Loading the files please wait ....