Completed
Push — master ( 42e194...987613 )
by Jacob
02:54
created

ArchangelTest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
c 1
b 0
f 0
lcom 0
cbo 2
dl 0
loc 27
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A testIsInstanceOfArchangel() 0 6 1
A testConstructSetsDefaultMailer() 0 8 1
A testConstructOverridesMailer() 0 7 1
1
<?php
2
3
namespace Jacobemerick\Archangel;
4
5
use PHPUnit_Framework_TestCase;
6
7
class ArchangelTest extends PHPUnit_Framework_TestCase
8
{
9
10
    public function testIsInstanceOfArchangel()
11
    {
12
        $archangel = new Archangel();
13
14
        $this->assertInstanceOf('Jacobemerick\Archangel\Archangel', $archangel);
15
    }
16
17
    public function testConstructSetsDefaultMailer()
18
    {
19
        $archangel = new Archangel();
20
        $mailer = sprintf('PHP/%s', phpversion());
21
        $headers = array('X-Mailer' => $mailer);
22
23
        $this->assertAttributeEquals($headers, 'headers', $archangel);
24
    }
25
26
    public function testConstructOverridesMailer()
27
    {
28
        $archangel = new Archangel('AwesomeMailer');
29
        $headers = array('X-Mailer' => 'AwesomeMailer');
30
31
        $this->assertAttributeEquals($headers, 'headers', $archangel);
32
    }
33
}
34