Completed
Push — master ( d068c5...99fa9d )
by Antonio
03:22 queued 58s
created

RecipientsHelperTest::testSanitize()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 9

Duplication

Lines 0
Ratio 0 %
Metric Value
dl 0
loc 12
rs 9.4286
cc 1
eloc 9
nc 1
nop 0
1
<?php
2
namespace Da\Mailer\Test\Helper;
3
4
use Da\Mailer\Helper\RecipientsHelper;
5
use PHPUnit_Framework_TestCase;
6
7
class RecipientsHelperTest extends PHPUnit_Framework_TestCase
8
{
9
    public function testSanitize()
10
    {
11
        $expected = ['[email protected]','[email protected]', '[email protected]'];
12
        $emailString = ' [email protected], [email protected]; [email protected] ,';
13
        $emailArray = [
14
            ' [email protected]',
15
            ' [email protected] ',
16
            '[email protected] '
17
        ];
18
        $this->assertEquals($expected, RecipientsHelper::sanitize($emailString));
19
        $this->assertEquals($expected, RecipientsHelper::sanitize($emailArray));
20
    }
21
}
22