pagantis / module-utils
Pagantis PHP Library. Module utils
Installs: 10 090
Dependents: 7
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 0
Requires
- php: >=5.3
- ext-json: *
Requires (Dev)
- facebook/webdriver: ^1.1
- fzaninotto/faker: ^1.7
- nayjest/str-case-converter: ^1.0
- phpunit/phpunit: ^4.8
- phpunit/phpunit-selenium: ^2.0
README
Module Utils will help you when developing integration test of Pagantis. The library will use the Exception object to find some problem. Check each exception type to find the error which causes the problem.
How to use
Install the library by:
-
Downloading it from here
-
Using Composer:
composer require pagantis/module-utils
Finally, be sure to include the autoloader:
require_once '/path/to/your-project/vendor/autoload.php';
Once the library is ready and inside the project the stub objects will available and the moduleUtils will also available.
//Amount mismatch Example try { if ($price1 != $price2) { throw new AmountMismatchException($price1, $price2); } } catch(AmountMismatchException $e) { $jsonResponse = new JsonExceptionResponse(); $jsonResponse->setException($e); $jsonResponse->toJson(); }
Help us to improve
We are happy to accept suggestions or pull requests. If you are willing to help us develop better software please create a pull request here following the PSR-2 code style and we will use reviewable to check the code and if al test pass and no issues are detected by SensioLab Insights you could will be ready to merge.