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

QuoteNotFoundExceptionTest::testConstructor()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 5
rs 10
1
<?php
2
3
namespace Tests\Pagantis\ModuleUtils;
4
5
use Pagantis\ModuleUtils\Exception\QuoteNotFoundException;
6
7
/**
8
 * Class QuoteNotFoundException
9
 *
10
 * @package Pagantis\ModuleUtils\Exception
11
 */
12
class QuoteNotFoundExceptionTest extends AbstractExceptionTest
13
{
14
    /**
15
     * ERROR_MESSAGE
16
     */
17
    const ERROR_MESSAGE = 'No quote found';
18
19
    /**
20
     * ERROR_CODE
21
     */
22
    const ERROR_CODE = 429;
23
24
    /**
25
     * testConstructor
26
     */
27
    public function testConstructor()
28
    {
29
        $exception = new QuoteNotFoundException();
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, QuoteNotFoundException::ERROR_MESSAGE);
40
        $this->assertEquals(self::ERROR_CODE, QuoteNotFoundException::ERROR_CODE);
41
    }
42
}
43