Skip to content

Commit

Permalink
Merge pull request #122 from braindawg/add_unitTest_addressListFluency
Browse files Browse the repository at this point in the history
Add unit test for #121: AddressList method fluency
  • Loading branch information
Ocramius authored Dec 31, 2020
2 parents 7a31017 + ae412e7 commit cf8c13b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/AddressListTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
use Laminas\Mail\Exception\InvalidArgumentException;
use Laminas\Mail\Header;
use PHPUnit\Framework\TestCase;
use Throwable;

/**
* @group Laminas_Mail
Expand Down Expand Up @@ -116,6 +117,15 @@ public function testCanAddManyAddressesAtOnce()
$this->assertTrue($this->list->has('announce@example.com'));
}

public function testCanAddFromStringFluently()
{
$this->list->addFromString('test_fromstring_fluency1@example.com')
->addFromString('test_fromstring_fluency2@example.com');

$this->assertTrue($this->list->has('test_fromstring_fluency1@example.com'));
$this->assertTrue($this->list->has('test_fromstring_fluency2@example.com'));
}

public function testLosesParensInName()
{
$header = '"Supports (E-mail)" <support@example.org>';
Expand Down

0 comments on commit cf8c13b

Please sign in to comment.