Download the PHP package nerds-and-company/craft-unit-test-suite without Composer
On this page you can find all versions of the php package nerds-and-company/craft-unit-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 craft-unit-test-suite
Unit Test Suite
PHPUnit test suit helps you with mocking several craft services and classes.
It enable you to:
- Configure any abstract classes you wish to load before running unit tests
- Save time by not having to manually mock Craft's database models and it's required classes
- Simply override or add extra methods to the mocked classes mocked in UnitTestSuite_AbstractTest
Requirements:
- PHP 5.4+
- Craft 2.4+
Installation:
The library can be installed using Composer.
Classes:
The library is composed of two classes:
UnitTestSuite_AbstractTest
is the abstract class you can extend that contains the mocked Craft database classesAbstractTestLoader
is used to load custom abstract classes that for example extend UnitTestSuite_AbstractTest and add extra functionality
Usage
- Make sure the phpunit bootstrap points at
bootstrap="vendor/unittestsuite/src/bootstrap.php
- Copy the
unittestsuite.yml
supplied with this package/craft/config
and add extra (abstract) classes you wish to pre-load - Extend
UnitTestSuite_AbstractTest
and override or add extra data to the returned mocks - Calling $this->mockCraftDb() should cover most of the Craft DB methods
All versions of craft-unit-test-suite with dependencies
PHP Build Version
Package Version
Requires
php Version
>= 5.3
The package nerds-and-company/craft-unit-test-suite contains the following files
Loading the files please wait ....