PHPackages                             sven/laravel-testing-utils - 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. sven/laravel-testing-utils

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

sven/laravel-testing-utils
==========================

v1.4.0(6y ago)243521[1 issues](https://github.com/svenluijten/laravel-testing-utils/issues)MITPHPPHP ^7.1

Since Oct 5Pushed 6y ago1 watchersCompare

[ Source](https://github.com/svenluijten/laravel-testing-utils)[ Packagist](https://packagist.org/packages/sven/laravel-testing-utils)[ RSS](/packages/sven-laravel-testing-utils/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (6)Dependencies (5)Versions (7)Used By (0)

[![laravel-testing-utils](https://user-images.githubusercontent.com/11269635/46561515-4d5a2c80-c8f8-11e8-8f16-b0eb950c5102.jpg)](https://user-images.githubusercontent.com/11269635/46561515-4d5a2c80-c8f8-11e8-8f16-b0eb950c5102.jpg)

Laravel Testing Utils
=====================

[](#laravel-testing-utils)

[![Latest Version on Packagist](https://camo.githubusercontent.com/098341e6d987794002c23cd7eccb85369d923c8668572c9a999e12adbb7f09e0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7376656e2f6c61726176656c2d74657374696e672d7574696c732e737667)](https://packagist.org/packages/sven/laravel-testing-utils)[![Total Downloads](https://camo.githubusercontent.com/eebc761cb6361648490ff7cb9443d7ef810afb15101a046a3ef25fbba0ea8fa1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7376656e2f6c61726176656c2d74657374696e672d7574696c732e737667)](https://packagist.org/packages/sven/laravel-testing-utils)[![Software License](https://camo.githubusercontent.com/074b89bca64d3edc93a1db6c7e3b1636b874540ba91d66367c0e5e354c56d0ea/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e737667)](LICENSE.md)[![Build Status](https://github.com/svenluijten/laravel-testing-utils/workflows/Tests/badge.svg)](https://github.com/svenluijten/laravel-testing-utils/actions?query=workflow%3ATests)[![StyleCI](https://camo.githubusercontent.com/f43880f9e004a35b85fc81facee4f7784ff8d9322b153021c3cad36f9c7c727c/68747470733a2f2f7374796c6563692e696f2f7265706f732f3130323136303834382f736869656c643f7374796c653d666c6174)](https://styleci.io/repos/102160848)[![PhpStan](https://camo.githubusercontent.com/4c44e84c5d68f905e747e666c55eabb7645e71fde9630042c3846fc43a0d1fbc/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068707374616e2d656e61626c65642d626c75652e737667)](https://github.com/phpstan/phpstan)

This package adds various Laravel-related assertions so you won't have to write them yourself in every new application.

Index
-----

[](#index)

- [Installation](#installation)
    - [Downloading](#downloading)
- [Usage](#usage)
    - [`InteractsWithViews`](#interactswithviews)
    - [`TestCollectionMacros`](#testcollectionmacros)
- [Contributing](#contributing)
- [License](#license)

Installation
------------

[](#installation)

You will have to follow a couple of steps to install this package.

### Downloading

[](#downloading)

Via [Composer](http://getcomposer.org):

```
$ composer require sven/laravel-testing-utils:^1.0 --dev
```

Or add the package to your development dependencies in `composer.json`and run `composer update` on the command line to download the package:

```
{
    "require-dev": {
        "sven/laravel-testing-utils": "^1.0"
    }
}
```

Usage
-----

[](#usage)

You will now have access to several traits and macros to use in your test classes.

### `InteractsWithViews`

[](#interactswithviews)

This trait adds several view-related assertions. They are used as follows:

```
