PHPackages                             backendtea/assert-object-same-state - 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. backendtea/assert-object-same-state

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

backendtea/assert-object-same-state
===================================

PHPUnit assertion helper to allow asserting objects are the same

1.0.0(6y ago)25[1 issues](https://github.com/BackEndTea/assert-object-same-state/issues)MITPHPPHP ^7.2CI failing

Since Dec 8Pushed 6y ago1 watchersCompare

[ Source](https://github.com/BackEndTea/assert-object-same-state)[ Packagist](https://packagist.org/packages/backendtea/assert-object-same-state)[ RSS](/packages/backendtea-assert-object-same-state/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (1)Dependencies (8)Versions (2)Used By (0)

Assert objects have same state
==============================

[](#assert-objects-have-same-state)

[![travis status](https://camo.githubusercontent.com/4a504df391eccb0d5e93eb2c184727cff8eb60e3dead63fd86c7695663853d25/68747470733a2f2f7472617669732d63692e6f72672f4261636b456e645465612f6173736572742d6f626a6563742d73616d652d73746174652e7376673f6272616e63683d6d6173746572)](https://camo.githubusercontent.com/4a504df391eccb0d5e93eb2c184727cff8eb60e3dead63fd86c7695663853d25/68747470733a2f2f7472617669732d63692e6f72672f4261636b456e645465612f6173736572742d6f626a6563742d73616d652d73746174652e7376673f6272616e63683d6d6173746572)

PHPUnit assertion helper to check if two objects have the same state.

Please note that same state only refers to the state of the properties. If you use the `static` keyword inside of functions, and they have their own state, then you are on your own.

Install
-------

[](#install)

Use [composer](https://getcomposer.org/):

```
$ composer require backendtea/assert-object-same-state --dev
```

### Usage

[](#usage)

This package is compatible with phpunit 8.

```
