test__constructWithNull()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 5
c 0
b 0
f 0
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
/*
4
 * This file is part of the jquery-datatables-bundle package.
5
 *
6
 * (c) 2018 WEBEWEB
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace WBW\Bundle\JQuery\DataTablesBundle\Tests\Exception;
13
14
use Exception;
15
use WBW\Bundle\JQuery\DataTablesBundle\Exception\BadDataTablesCSVExporterException;
16
use WBW\Bundle\JQuery\DataTablesBundle\Provider\DataTablesCSVExporterInterface;
17
use WBW\Bundle\JQuery\DataTablesBundle\Tests\AbstractTestCase;
18
19
/**
20
 * Bad DataTables CSV exporter exception test.
21
 *
22
 * @author webeweb <https://github.com/webeweb>
23
 * @package WBW\Bundle\JQuery\DataTablesBundle\Tests\Exception
24
 */
25
class BadDataTablesCSVExporterExceptionTest extends AbstractTestCase {
26
27
    /**
28
     * Test __construct()
29
     *
30
     * @return void
31
     */
32
    public function test__construct(): void {
33
34
        $obj = new BadDataTablesCSVExporterException(new Exception());
35
36
        $this->assertEquals('The DataTables CSV exporter "Exception" must implement ' . DataTablesCSVExporterInterface::class, $obj->getMessage());
37
    }
38
39
    /**
40
     * Test __construct()
41
     *
42
     * @return void
43
     */
44
    public function test__constructWithNull(): void {
45
46
        $obj = new BadDataTablesCSVExporterException(null);
47
48
        $this->assertEquals("The DataTables CSV exporter is null", $obj->getMessage());
49
    }
50
}
51