ReplyMessageTest   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 1
dl 0
loc 26
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 4 1
A testInterface() 0 4 1
A testThreadWorks() 0 6 1
1
<?php
2
3
/*
4
 * This file is part of the MilioooMessageBundle package.
5
 *
6
 * (c) Michiel boeckaert <[email protected]>
7
 * This source file is subject to the MIT license that is bundled
8
 * with this source code in the file LICENSE.
9
 */
10
11
namespace Miliooo\Messaging\Tests\Form\FormModel;
12
13
use Miliooo\Messaging\Form\FormModel\ReplyMessage;
14
15
/**
16
 * Test file for Miliooo\Messaging\Form\FormModel\ReplyMessage
17
 *
18
 * @author Michiel Boeckaert <[email protected]>
19
 */
20
class ReplyMessageTest extends \PHPUnit_Framework_TestCase
21
{
22
    /**
23
     * The class under test
24
     *
25
     * @var ReplyMessage
26
     */
27
    private $replyMessage;
28
29
    public function setUp()
30
    {
31
        $this->replyMessage = new ReplyMessage();
32
    }
33
34
    public function testInterface()
35
    {
36
        $this->assertInstanceOf('Miliooo\Messaging\Form\FormModel\ReplyMessageInterface', $this->replyMessage);
37
    }
38
39
    public function testThreadWorks()
40
    {
41
        $thread = $this->getMock('Miliooo\Messaging\Model\ThreadInterface');
42
        $this->replyMessage->setThread($thread);
43
        $this->assertSame($thread, $this->replyMessage->getThread());
44
    }
45
}
46