|
@@ 172-183 (lines=12) @@
|
| 169 |
|
$this->assertEquals([$firstPhone, $secondPhone, $thirdPhone], $actual->toArray()); |
| 170 |
|
} |
| 171 |
|
|
| 172 |
|
public function testRemoveExistingPhone() |
| 173 |
|
{ |
| 174 |
|
$customer = new B2bCustomer(); |
| 175 |
|
$firstPhone = new B2bCustomerPhone('06001122334455'); |
| 176 |
|
$secondPhone = new B2bCustomerPhone('07001122334455'); |
| 177 |
|
$customerPhones = [$firstPhone, $secondPhone]; |
| 178 |
|
|
| 179 |
|
$customer->resetPhones($customerPhones); |
| 180 |
|
$customer->removePhone($secondPhone); |
| 181 |
|
$actual = $customer->getPhones(); |
| 182 |
|
$this->assertEquals([$firstPhone], $actual->toArray()); |
| 183 |
|
} |
| 184 |
|
|
| 185 |
|
public function testRemoveNonExistingPhone() |
| 186 |
|
{ |
|
@@ 185-197 (lines=13) @@
|
| 182 |
|
$this->assertEquals([$firstPhone], $actual->toArray()); |
| 183 |
|
} |
| 184 |
|
|
| 185 |
|
public function testRemoveNonExistingPhone() |
| 186 |
|
{ |
| 187 |
|
$customer = new B2bCustomer(); |
| 188 |
|
$firstPhone = new B2bCustomerPhone('06001122334455'); |
| 189 |
|
$secondPhone = new B2bCustomerPhone('07001122334455'); |
| 190 |
|
$thirdPhone = new B2bCustomerPhone('08001122334455'); |
| 191 |
|
$customerPhones = [$firstPhone, $secondPhone]; |
| 192 |
|
|
| 193 |
|
$customer->resetPhones($customerPhones); |
| 194 |
|
$customer->removePhone($thirdPhone); |
| 195 |
|
$actual = $customer->getPhones(); |
| 196 |
|
$this->assertEquals([$firstPhone, $secondPhone], $actual->toArray()); |
| 197 |
|
} |
| 198 |
|
|
| 199 |
|
public function testGetPrimaryPhone() |
| 200 |
|
{ |
|
@@ 247-258 (lines=12) @@
|
| 244 |
|
$this->assertEquals([$firstEmail, $secondEmail, $thirdEmail], $actual->toArray()); |
| 245 |
|
} |
| 246 |
|
|
| 247 |
|
public function testRemoveExistingEmail() |
| 248 |
|
{ |
| 249 |
|
$customer = new B2bCustomer(); |
| 250 |
|
$firstEmail = new B2bCustomerEmail('[email protected]'); |
| 251 |
|
$secondEmail = new B2bCustomerEmail('[email protected]'); |
| 252 |
|
$customerEmails = [$firstEmail, $secondEmail]; |
| 253 |
|
|
| 254 |
|
$customer->resetEmails($customerEmails); |
| 255 |
|
$customer->removeEmail($secondEmail); |
| 256 |
|
$actual = $customer->getEmails(); |
| 257 |
|
$this->assertEquals([$firstEmail], $actual->toArray()); |
| 258 |
|
} |
| 259 |
|
|
| 260 |
|
public function testRemoveNonExistingEmail() |
| 261 |
|
{ |
|
@@ 260-272 (lines=13) @@
|
| 257 |
|
$this->assertEquals([$firstEmail], $actual->toArray()); |
| 258 |
|
} |
| 259 |
|
|
| 260 |
|
public function testRemoveNonExistingEmail() |
| 261 |
|
{ |
| 262 |
|
$customer = new B2bCustomer(); |
| 263 |
|
$firstEmail = new B2bCustomerEmail('[email protected]'); |
| 264 |
|
$secondEmail = new B2bCustomerEmail('[email protected]'); |
| 265 |
|
$thirdEmail = new B2bCustomerEmail('[email protected]'); |
| 266 |
|
$customerEmails = [$firstEmail, $secondEmail]; |
| 267 |
|
|
| 268 |
|
$customer->resetEmails($customerEmails); |
| 269 |
|
$customer->removeEmail($thirdEmail); |
| 270 |
|
$actual = $customer->getEmails(); |
| 271 |
|
$this->assertEquals([$firstEmail, $secondEmail], $actual->toArray()); |
| 272 |
|
} |
| 273 |
|
|
| 274 |
|
public function testGetPrimaryEmail() |
| 275 |
|
{ |