From 5de0ddb539c33bf7803fadc69c037f5908b9ff2e Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Fri, 3 May 2019 23:08:53 +0100 Subject: [PATCH] Fix partials test --- tests/Unit/Service/PartialsTest.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/Unit/Service/PartialsTest.php b/tests/Unit/Service/PartialsTest.php index 47a1b3c..7ed3cac 100644 --- a/tests/Unit/Service/PartialsTest.php +++ b/tests/Unit/Service/PartialsTest.php @@ -16,9 +16,13 @@ class PartialsTest extends TestCase $this->assertCount(3, $filters); - $this->assertSame('foo@example.com', $filters[0]->toArray()['from'][0]); - $this->assertSame('bar@example.com', $filters[1]->toArray()['from'][0]); - $this->assertSame('baz@example.com', $filters[2]->toArray()['from'][0]); + $toAddresses = collect($filters) + ->flatMap->getConditions()->map->getValues() + ->flatten(); + + $this->assertSame('foo@example.com', $toAddresses[0]); + $this->assertSame('bar@example.com', $toAddresses[1]); + $this->assertSame('baz@example.com', $toAddresses[2]); } }