Skip to content

Commit

Permalink
Updated test cases for addMany() fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
rafalwrzeszcz committed Jan 2, 2012
1 parent 66b1235 commit 3086047
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion library/Zend/Mail/AddressList.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public function addMany(array $addresses)
if (is_int($key) || is_numeric($key)) {
$this->add($value);
} elseif (is_string($key)) {
$this->add($key, value);
$this->add($key, $value);
} else {
throw new Exception\RuntimeException(sprintf(
'Invalid key type in provided addresses array ("%s")',
Expand Down
3 changes: 1 addition & 2 deletions tests/Zend/Mail/AddressListTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public function testCanAddManyAddressesAtOnce()
{
$addresses = array(
'[email protected]',
'ZF Contributors List' => '[email protected]',
'[email protected]' => 'ZF Contributors List',
new Address('[email protected]', 'ZF Announce List'),
);
$this->list->addMany($addresses);
Expand All @@ -112,7 +112,6 @@ public function testDoesNotStoreDuplicatesAndFirstWins()
{
$addresses = array(
'[email protected]',
'ZF DevTeam' => '[email protected]',
new Address('[email protected]', 'ZF DevTeam'),
);
$this->list->addMany($addresses);
Expand Down

0 comments on commit 3086047

Please sign in to comment.