|
|
@@ -196,12 +196,16 @@ class EmailTest extends TestCase {
|
|
|
$this->assertSame($this->CakeEmail->to(), $expected);
|
|
|
|
|
|
$list = array(
|
|
|
+ 'root@localhost' => 'root',
|
|
|
+ 'bjørn@hammeröath.com' => 'Bjorn',
|
|
|
'cake@cakephp.org' => 'Cake PHP',
|
|
|
'cake-php@googlegroups.com' => 'Cake Groups',
|
|
|
'root@cakephp.org'
|
|
|
);
|
|
|
$this->CakeEmail->to($list);
|
|
|
$expected = array(
|
|
|
+ 'root@localhost' => 'root',
|
|
|
+ 'bjørn@hammeröath.com' => 'Bjorn',
|
|
|
'cake@cakephp.org' => 'Cake PHP',
|
|
|
'cake-php@googlegroups.com' => 'Cake Groups',
|
|
|
'root@cakephp.org' => 'root@cakephp.org'
|
|
|
@@ -212,6 +216,8 @@ class EmailTest extends TestCase {
|
|
|
$this->CakeEmail->addTo('mark_story@cakephp.org', 'Mark Story');
|
|
|
$result = $this->CakeEmail->addTo(array('phpnut@cakephp.org' => 'PhpNut', 'jose_zap@cakephp.org'));
|
|
|
$expected = array(
|
|
|
+ 'root@localhost' => 'root',
|
|
|
+ 'bjørn@hammeröath.com' => 'Bjorn',
|
|
|
'cake@cakephp.org' => 'Cake PHP',
|
|
|
'cake-php@googlegroups.com' => 'Cake Groups',
|
|
|
'root@cakephp.org' => 'root@cakephp.org',
|
|
|
@@ -222,9 +228,6 @@ class EmailTest extends TestCase {
|
|
|
);
|
|
|
$this->assertSame($this->CakeEmail->to(), $expected);
|
|
|
$this->assertSame($this->CakeEmail, $result);
|
|
|
-
|
|
|
- $this->setExpectedException('Cake\Network\Error\SocketException');
|
|
|
- $this->CakeEmail->to(array('cake@localhost', 'CakePHP'));
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -238,8 +241,6 @@ class EmailTest extends TestCase {
|
|
|
array(''),
|
|
|
array('string'),
|
|
|
array('<tag>'),
|
|
|
- array('some@one-whereis'),
|
|
|
- array('wrong@key' => 'Name'),
|
|
|
array(array('ok@cakephp.org', 1.0, '', 'string'))
|
|
|
);
|
|
|
}
|
|
|
@@ -273,7 +274,6 @@ class EmailTest extends TestCase {
|
|
|
*/
|
|
|
public function testEmailPattern() {
|
|
|
$regex = '/.+@.+\..+/i';
|
|
|
- $this->assertNull($this->CakeEmail->emailPattern());
|
|
|
$this->assertSame($regex, $this->CakeEmail->emailPattern($regex)->emailPattern());
|
|
|
}
|
|
|
|