PHPackages                             jwest/slim-testing - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. jwest/slim-testing

ActiveLibrary[Testing &amp; Quality](/categories/testing)

jwest/slim-testing
==================

Simple util for integration tests in slim framework

1.0.0(12y ago)14PHP

Since Jul 16Pushed 12y ago1 watchersCompare

[ Source](https://github.com/jwest/SlimTesting)[ Packagist](https://packagist.org/packages/jwest/slim-testing)[ RSS](/packages/jwest-slim-testing/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (2)Versions (2)Used By (0)

\#Integration tests for Slim Framework

If you doing integration tests for your app writen in slim framework, you must use this package ;)

\##How it works?

1. Name for your test with sufix \*ItTest.php (for readibility),
2. Test class extends with Slim\\Test\\Testing,
3. Field $app in class showing where your app started (public/index.php),
4. Use five magic methods for create and send request to your app:

    - get($route) - send request via GET
    - delete($route) - send request via DELETE
    - post($route, $params) - send request via POST with parameters encoded with http params format
    - postJson($route, $params) - send request via POST with json as request body
    - put($route, $params) - send request via PUT with parameters encoded with http params format
    - putJson($route, $params) - send request via PUT with json as request body
5. Use query string in routes.

Example in: tests/Slim/Test/TestingItTest.php

```
