DisabledDataExceptionTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 4
c 2
b 0
f 0
dl 0
loc 25
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testGetDataName() 0 4 1
A testConstructor() 0 3 1
1
<?php
2
/**
3
 * Swiss Payment Slip
4
 *
5
 * @license http://www.opensource.org/licenses/mit-license.php MIT License
6
 * @copyright 2012-2016 Some nice Swiss guys
7
 * @author Marc Würth [email protected]
8
 * @author Manuel Reinhard <[email protected]>
9
 * @author Peter Siska <[email protected]>
10
 * @link https://github.com/ravage84/SwissPaymentSlip/
11
 */
12
13
namespace SwissPaymentSlip\SwissPaymentSlip\Tests;
14
15
use SwissPaymentSlip\SwissPaymentSlip\Exception\DisabledDataException;
16
17
/**
18
 * Tests for the DisabledDataException class
19
 *
20
 * @coversDefaultClass SwissPaymentSlip\SwissPaymentSlip\Exception\DisabledDataException
21
 */
22
class DisabledDataExceptionTest extends \PHPUnit_Framework_TestCase
23
{
24
    /**
25
     * Tests the constructor
26
     *
27
     * @return void
28
     * @expectedException SwissPaymentSlip\SwissPaymentSlip\Exception\DisabledDataException
29
     * @expectedExceptionMessage You are accessing the disabled FooBar. You need to re-enable it first
30
     * @covers ::__construct
31
     */
32
    public function testConstructor()
33
    {
34
        throw new DisabledDataException('FooBar');
35
    }
36
37
    /**
38
     * Tests the getDataName method
39
     *
40
     * @return void
41
     * @covers ::getDataName
42
     */
43
    public function testGetDataName()
44
    {
45
        $exception = new DisabledDataException('FooBar');
46
        $this->assertEquals('FooBar', $exception->getDataName());
47
    }
48
}
49