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

AlreadyProcessedExceptionTest::testConstant()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

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