Skip to content

Commit ea8ff3a

Browse files
committed
Fixing tests
1 parent 407787a commit ea8ff3a

File tree

3 files changed

+2
-15
lines changed

3 files changed

+2
-15
lines changed

Tests/Unit/Rfc822ParseAdrlistTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,11 @@ public function test_rfc822_parse_adrlist() : void
1414
$this->assertEquals('doe', $address_array[0]->mailbox);
1515
$this->assertEquals('example.com', $address_array[0]->host);
1616
$this->assertEquals('Joe Doe', $address_array[0]->personal);
17-
$this->assertEmpty($address_array[0]->adl);
1817

1918
$this->assertEquals('postmaster', $address_array[1]->mailbox);
2019
$this->assertEquals('example.com', $address_array[1]->host);
21-
$this->assertEmpty($address_array[1]->personal);
22-
$this->assertEmpty($address_array[1]->adl);
2320

2421
$this->assertEquals('root', $address_array[2]->mailbox);
2522
$this->assertEquals('example.com', $address_array[2]->host);
26-
$this->assertEmpty($address_array[2]->personal);
27-
$this->assertEmpty($address_array[2]->adl);
2823
}
2924
}

Tests/Unit/Rfc822WriteAddressTest.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,9 @@ class Rfc822WriteAddressTest extends \PHPUnit\Framework\TestCase
77
public function test_rfc822_write_address() : void
88
{
99
$address = imap_rfc822_write_address("hartmut", "example.com", "Hartmut Holzgraefe");
10-
$this->assertEquals($address, 'Hartmut Holzgraefe <[email protected]>');
10+
$this->assertEquals('Hartmut Holzgraefe <[email protected]>', $address);
1111

1212
$address = imap_rfc822_write_address("hartmut", "example.com", '');
13-
$this->assertEquals($address, '[email protected]');
14-
15-
$address = imap_rfc822_write_address("[email protected]", '', '');
16-
$this->assertEquals($address, '[email protected]');
13+
$this->assertEquals('[email protected]', $address);
1714
}
1815
}

src/Imap2/Functions.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,6 @@ public static function getAddressObjectList(array $addressList, string $defaultH
4646
{
4747
$addressObject->personal = $personal;
4848
}
49-
else
50-
{
51-
$addressObject->personal = '';
52-
}
53-
$addressObject->adl = '';
5449

5550
$addressObjectList[] = $addressObject;
5651
}

0 commit comments

Comments
 (0)