PHPackages                             baopham/api-mocker - 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. baopham/api-mocker

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

baopham/api-mocker
==================

API mocker for Laravel apps

0.3.0(7y ago)6193.0k6[1 PRs](https://github.com/baopham/laravel-api-mocker/pulls)MITPHPCI failing

Since Nov 22Pushed 5y ago1 watchersCompare

[ Source](https://github.com/baopham/laravel-api-mocker)[ Packagist](https://packagist.org/packages/baopham/api-mocker)[ RSS](/packages/baopham-api-mocker/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (3)Versions (5)Used By (0)

api-mocker
==========

[](#api-mocker)

Laravel package to mock API endpoints.

If your apps need to integrate with other APIs (Github, Marketo, etc.), you don't want to invoke their API calls during testing. With this package, you can quickly mock the endpoints and it can be especially useful for Behat tests.

Usage:
------

[](#usage)

1. `composer require baopham/api-mocker --dev`
2. Register Service Provider in `app/Providers/AppServiceProvider.php`:

```
public function register()
{
    if ($this->app->environment() == 'testing') {
        $this->app->register('BaoPham\ApiMocker\ApiMockerServiceProvider');
    }
}
```

3. `php artisan vendor:publish`
4. Update the new config file: `config/apimocker.php`:

```
