Completed
Push — master ( df6049...d068c5 )
by Antonio
07:08 queued 04:48
created

RecipientsHelperTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 15
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A testSanitize() 0 12 1
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