Passed
Pull Request — master (#59)
by Raúl
05:19 queued 01:21
created

AlreadyProcessedExceptionTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 8
c 1
b 0
f 0
dl 0
loc 29
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testConstant() 0 4 1
A testConstructor() 0 5 1
1
<?php
2
3
namespace Tests\Pagantis\ModuleUtils;
4
5
use Pagantis\ModuleUtils\Exception\AlreadyProcessedException;
6
7
/**
8
 * Class AlreadyProcessedException
9
 *
10
 * @package Pagantis\ModuleUtils\Exception
11
 */
12
class AlreadyProcessedExceptionTest extends AbstractExceptionTest
13
{
14
    /**
15
     * ERROR_MESSAGE
16
     */
17
    const ERROR_MESSAGE = 'Cart already processed';
18
19
    /**
20
     * ERROR_CODE
21
     */
22
    const ERROR_CODE = 200;
23
24
    /**
25
     * testConstructor
26
     */
27
    public function testConstructor()
28
    {
29
        $exception = new AlreadyProcessedException();
30
        $this->assertEquals(self::ERROR_MESSAGE, $exception->getMessage());
31
        $this->assertEquals(self::ERROR_CODE, $exception->getCode());
32
    }
33
34
    /**
35
     * testConstant
36
     */
37
    public function testConstant()
38
    {
39
        $this->assertEquals(self::ERROR_MESSAGE, AlreadyProcessedException::ERROR_MESSAGE);
40
        $this->assertEquals(self::ERROR_CODE, AlreadyProcessedException::ERROR_CODE);
41
    }
42
}
43