Passed
Push — html ( 51e1ba...d230bc )
by Peter
02:59
created

DebugTest::testMysqlDate()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
nc 1
nop 4
dl 0
loc 5
rs 10
c 1
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace AbterPhp\Framework\Helper;
6
7
use PHPUnit\Framework\TestCase;
8
9
class DebugTest extends TestCase
10
{
11
    /**
12
     * @return array[]
13
     */
14
    public function mysqlDateProvider(): array
15
    {
16
        return [
17
            ['foo %d bar %s', 15, ['baz'], 'foo 15 bar baz'],
18
        ];
19
    }
20
21
    /**
22
     * @dataProvider mysqlDateProvider
23
     *
24
     * @param string $str
25
     * @param        $val
26
     * @param array  $extra
27
     * @param string $expectedResult
28
     */
29
    public function testMysqlDate(string $str, $val, array $extra, string $expectedResult): void
30
    {
31
        $actualResult = Debug::prettyPrint($str, $val, ...$extra);
32
33
        $this->assertSame($expectedResult, $actualResult);
34
    }
35
}
36