Issues (8)

Exceptions/ConfigValidationFailedExceptionTest.php (2 issues)

1
<?php
2
/**
3
 * This file is part of graze/config-validation.
4
 *
5
 * Copyright (c) 2017 Nature Delivered Ltd. <https://www.graze.com>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 *
10
 * @license https://github.com/graze/config-validation/blob/master/LICENSE.md
11
 * @link    https://github.com/graze/config-validation
12
 */
13
14
namespace Graze\ConfigValidation\Test\Unit\Exceptions;
15
16
use Exception;
17
use Graze\ConfigValidation\Exceptions\ConfigValidationFailedException;
18
use Graze\ConfigValidation\Test\TestCase;
19
20
class ConfigValidationFailedExceptionTest extends TestCase
21
{
22
    public function testGenericExceptionHandling()
23
    {
24
        $orig = new Exception('test ');
25
26
        $exception = new ConfigValidationFailedException(__CLASS__, 'message', $orig);
0 ignored issues
show
'message' of type string is incompatible with the type integer expected by parameter $message of Graze\ConfigValidation\E...xception::__construct(). ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

26
        $exception = new ConfigValidationFailedException(__CLASS__, /** @scrutinizer ignore-type */ 'message', $orig);
Loading history...
27
28
        $this->assertEquals(
29
            <<<TEXT
30
Processor 'Graze\ConfigValidation\Test\Unit\Exceptions\ConfigValidationFailedExceptionTest' failed validation
31
test message
32
TEXT
33
            ,
0 ignored issues
show
Space found before comma in function call
Loading history...
34
            $exception->getMessage()
35
        );
36
    }
37
}
38