TicketTest::labels()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

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