Completed
Push — master ( e56856...67d12b )
by Antonio
04:26
created

RecipientsHelperTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 2
dl 0
loc 15
rs 10
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