ContactReminderTest::testConstruction()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 0
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
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