ParticipantTestHelperTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 17
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testInstanceOfParticipantInterface() 0 5 1
A testConstructorArgumentIsGetParticipantIdResult() 0 8 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\TestHelpers;
12
13
use Miliooo\Messaging\TestHelpers\ParticipantTestHelper;
14
15
/**
16
 * The test file for Miliooo\Messaging\TestHelpers\ParticipantTestHelper
17
 *
18
 * @author Michiel Boeckaert <[email protected]>
19
 */
20
class ParticipantTestHelperTest extends \PHPUnit_Framework_TestCase
21
{
22
    public function testInstanceOfParticipantInterface()
23
    {
24
        $class = new ParticipantTestHelper(1);
25
        $this->assertInstanceOf('Miliooo\Messaging\User\ParticipantInterface', $class);
26
    }
27
28
    public function testConstructorArgumentIsGetParticipantIdResult()
29
    {
30
        $class1 = new ParticipantTestHelper(1);
31
        $this->assertEquals(1, $class1->getParticipantId());
32
33
        $class2 = new ParticipantTestHelper('foo');
34
        $this->assertEquals('foo', $class2->getParticipantId());
35
    }
36
}
37