Passed
Branch master (d3d7fc)
by Eugene
10:15 queued 04:37
created

PhpUnitCompat::expectExceptionMessageMatches()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 9
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 4
nc 2
nop 1
dl 0
loc 9
rs 10
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * This file is part of the tarantool/queue package.
5
 *
6
 * (c) Eugene Leonovich <[email protected]>
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
declare(strict_types=1);
13
14
namespace Tarantool\Queue\Tests;
15
16
/**
17
 * A compatibility layer for the legacy PHPUnit 7.
18
 */
19
trait PhpUnitCompat
20
{
21
    public function expectExceptionMessageMatches(string $regularExpression) : void
22
    {
23
        if (\is_callable('parent::expectExceptionMessageMatches')) {
24
            parent::expectExceptionMessageMatches($regularExpression);
25
26
            return;
27
        }
28
29
        parent::expectExceptionMessageRegExp($regularExpression);
30
    }
31
}
32