| Conditions | 1 |
| Paths | 1 |
| Total Lines | 24 |
| Code Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 40 | public function testEquals() |
||
| 41 | { |
||
| 42 | $this |
||
| 43 | ->given( |
||
| 44 | $aggregateRoot1 = new Post( |
||
| 45 | PostId::fromNative($this->faker->unique()->uuid()), |
||
| 46 | $this->faker->sentence(), |
||
| 47 | $this->faker->paragraph() |
||
| 48 | ) |
||
| 49 | ) |
||
| 50 | ->and( |
||
| 51 | $aggregateRoot2 = new Post( |
||
| 52 | PostId::fromNative($this->faker->ean13()), |
||
| 53 | $this->faker->sentence(), |
||
| 54 | $this->faker->paragraph() |
||
| 55 | ) |
||
| 56 | ) |
||
| 57 | ->then() |
||
| 58 | ->boolean($aggregateRoot1->equals($aggregateRoot1)) |
||
| 59 | ->isTrue() |
||
| 60 | ->boolean($aggregateRoot1->equals($aggregateRoot2)) |
||
| 61 | ->isFalse() |
||
| 62 | ; |
||
| 63 | } |
||
| 64 | } |
||
| 65 |