ContactReminderTest   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 5

Importance

Changes 0
Metric Value
dl 0
loc 27
rs 10
c 0
b 0
f 0
wmc 4
lcom 1
cbo 5

4 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 3 1
A getContact() 0 6 1
A testConstruction() 0 5 1
A testPostPhoneUntil() 0 5 1
1
<?php
2
require_once 'Intraface/modules/contact/ContactReminder.php';
3
require_once 'ContactStubs.php';
4
5
class ContactReminderTest extends PHPUnit_Framework_TestCase
6
{
7
    private $kernel;
0 ignored issues
show
Unused Code introduced by
The property $kernel is not used and could be removed.

This check marks private properties in classes that are never used. Those properties can be removed.

Loading history...
8
9
    function setUp()
10
    {
11
    }
12
13
    function getContact()
14
    {
15
        $kernel = new FakeContactKernel;
16
        $kernel->intranet = new FakeContactIntranet;
17
        return new FakeContactContact($kernel);
18
    }
19
20
    function testConstruction()
21
    {
22
        $reminder = new ContactReminder($this->getContact());
23
        $this->assertTrue(is_object($reminder));
24
    }
25
26
    function testPostPhoneUntil()
27
    {
28
        $reminder = new ContactReminder($this->getContact());
29
        $this->assertTrue($reminder->postponeUntil(date('Y-') . date('m') + 1 . date('-d')));
30
    }
31
}
32