/**
* Test addressing.
*/
public function testAddressing()
{
$this->assertFalse($this->Mail->addAddress(''), 'Empty address accepted');
$this->assertFalse($this->Mail->addAddress('', 'Nobody'), 'Empty address with name accepted');
$this->assertFalse($this->Mail->addAddress('*****@*****.**'), 'Invalid address accepted');
$this->assertTrue($this->Mail->addAddress('*****@*****.**'), 'Addressing failed');
$this->assertFalse($this->Mail->addAddress('*****@*****.**'), 'Duplicate addressing failed');
$this->assertTrue($this->Mail->addCC('*****@*****.**'), 'CC addressing failed');
$this->assertFalse($this->Mail->addCC('*****@*****.**'), 'CC duplicate addressing failed');
$this->assertFalse($this->Mail->addCC('*****@*****.**'), 'CC duplicate addressing failed (2)');
$this->assertTrue($this->Mail->addBCC('*****@*****.**'), 'BCC addressing failed');
$this->assertFalse($this->Mail->addBCC('*****@*****.**'), 'BCC duplicate addressing failed');
$this->assertFalse($this->Mail->addBCC('*****@*****.**'), 'BCC duplicate addressing failed (2)');
$this->assertTrue($this->Mail->addReplyTo('*****@*****.**'), 'Replyto Addressing failed');
$this->assertFalse($this->Mail->addReplyTo('*****@*****.**'), 'Invalid Replyto address accepted');
$this->assertTrue($this->Mail->setFrom('*****@*****.**', 'some name'), 'setFrom failed');
$this->assertFalse($this->Mail->setFrom('[email protected].', 'some name'), 'setFrom accepted invalid address');
$this->Mail->Sender = '';
$this->Mail->setFrom('*****@*****.**', 'some name', true);
$this->assertEquals($this->Mail->Sender, '*****@*****.**', 'setFrom failed to set sender');
$this->Mail->Sender = '';
$this->Mail->setFrom('*****@*****.**', 'some name', false);
$this->assertEquals($this->Mail->Sender, '', 'setFrom should not have set sender');
$this->Mail->clearCCs();
$this->Mail->clearBCCs();
$this->Mail->clearReplyTos();
}