TicketTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A labels() 0 8 1
A ticketShouldHaveLabel() 0 6 1
1
<?php
2
/**
3
 * @author    Markus Tacker <[email protected]>
4
 * @copyright 2013-2016 Verein zur Förderung der Netzkultur im Rhein-Main-Gebiet e.V. | http://netzkultur-rheinmain.de/
5
 */
6
7
namespace BCRM\BackendBundle\Tests\Unit\Entity\Event;
8
9
use BCRM\BackendBundle\Entity\Event\Ticket;
10
use BCRM\BackendBundle\Entity\Event\Registration;
11
12
class TicketTest extends \PHPUnit_Framework_TestCase
13
{
14
    public function labels()
15
    {
16
        return array(
17
            array(Registration::TYPE_NORMAL, ''),
18
            array(Registration::TYPE_SPONSOR, 'Sponsor'),
19
            array(Registration::TYPE_VIP, 'VIP')
20
        );
21
    }
22
    
23
    /**
24
     * @test
25
     * @group        unit
26
     * @dataProvider labels
27
     */
28
    public function ticketShouldHaveLabel($type, $label)
29
    {
30
        $ticket = new Ticket();
31
        $ticket->setType($type);
32
        $this->assertEquals($label, $ticket->getLabel());
33
    }
34
}
35