PHPackages                             julesgraus/livewire-view-assertions - 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. julesgraus/livewire-view-assertions

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

julesgraus/livewire-view-assertions
===================================

Adds extra assertions to Livewires tests to assert that things are bound in the view of components

1.0.3(3y ago)016PHP

Since Mar 6Pushed 2y ago1 watchersCompare

[ Source](https://github.com/julesgraus/livewire-view-assertions)[ Packagist](https://packagist.org/packages/julesgraus/livewire-view-assertions)[ RSS](/packages/julesgraus-livewire-view-assertions/feed)WikiDiscussions main Synced yesterday

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

Livewire 2 view assertions
==========================

[](#livewire-2-view-assertions)

The current [Laravel Livewire](https://laravel-livewire.com) test functionalities for version 2 don't have assertions that allow you to check if a property or action form a Livewire component actually are bound to the view of a [Laravel Livewire](https://laravel-livewire.com) component.

With this package you'll get a couple of extra assertions you can use to do so. I've created a discussion and pull request too to the [Livewire GitHub repository](https://github.com/livewire/livewire). So in the near feature, i hope that you can use these assertions directly from the Livewire package itself. Or just simply ask. I will then be abl

Installation instructions
-------------------------

[](#installation-instructions)

Using composer: `composer require julesgraus/livewire-view-assertions`

Usage
-----

[](#usage)

In your tests, use the `JulesGraus\LivewireViewAssertions\Livewire` facade like so for example:

```
//Other imports here
use JulesGraus\LivewireViewAssertions\Livewire

class TestableLivewireViewBindingsTest extends TestCase
{
    public function test_asserts_all_properties_are_bound()
    {
        Livewire::test(SomeComponent::class)
            ->assertPropertyBound('foo')
            ->assertPropertyBound('bar', 2);
    }
}
```

Assertions overview
-------------------

[](#assertions-overview)

This package gives you the following assertions. If after reading their descriptions below, it still isn't clear on how to use them, please have a [look at the tests](tests/Unit/TestableLivewireViewBindingsTest.php) in this package.

### assertPropertyBound

[](#assertpropertybound)

Assert that a property is bound using a `wire:model` attribute in the blade template of the component.

The first parameter must be the name of the property you want to check. The second parameter checks how often the property must be bound. If you omit it or set it to null, it will check if it is at least bound once.

### assertPropertyNotBound

[](#assertpropertynotbound)

Asserts that a property isn't bound using a `wire:model` attribute in the blade template of the component.

The first parameter must be the name of the property you want to check.

### assertActionBound

[](#assertactionbound)

Assert that an action is bound using a `wire:[dispatched browser event]` attribute in the blade template of the component.

The first parameter must be the name of the action you want to check. The second parameter checks how often the action must be bound. If you omit it or set it to null, it will check if it is at least bound once.

### assertPropertyNotBound

[](#assertpropertynotbound-1)

Asserts that an action isn't bound using a `wire:[dispatched browser event]` attribute in the blade template of the component.

The first parameter must be the name of the action you want to check.

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

4

Last Release

1213d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/aa9d50f487032f07737b2201a5500719f0f3d91207ad93541c50bc01440c1f7e?d=identicon)[julesgraus](/maintainers/julesgraus)

---

Top Contributors

[![julesgraus](https://avatars.githubusercontent.com/u/4387442?v=4)](https://github.com/julesgraus "julesgraus (6 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/julesgraus-livewire-view-assertions/health.svg)

```
[![Health](https://phpackages.com/badges/julesgraus-livewire-view-assertions/health.svg)](https://phpackages.com/packages/julesgraus-livewire-view-assertions)
```

###  Alternatives

[tallstackui/tallstackui

TallStackUI is a powerful suite of Blade components that elevate your workflow of Livewire applications.

725172.4k14](/packages/tallstackui-tallstackui)[tomasvotruba/bladestan

PHPStan rule for static analysis of Blade templates

368724.8k6](/packages/tomasvotruba-bladestan)[filament/support

Core helper methods and foundation code for all Filament packages.

2331.0M245](/packages/filament-support)[nasirkhan/laravel-starter

A CMS like modular Laravel starter project.

1.4k2.7k](/packages/nasirkhan-laravel-starter)[yajra/laravel-datatables-export

Laravel DataTables Queued Export Plugin.

362.2M4](/packages/yajra-laravel-datatables-export)[calebdw/larastan-livewire

A Larastan / PHPStan extension for Livewire.

47698.4k6](/packages/calebdw-larastan-livewire)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
