Completed
Push — master ( d70e65...52ffc4 )
by Maurício
21s queued 15s
created

OrderKeywordTest::testBuild()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 5
nc 1
nop 0
dl 0
loc 10
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace PhpMyAdmin\SqlParser\Tests\Components;
6
7
use PhpMyAdmin\SqlParser\Components\Expression;
8
use PhpMyAdmin\SqlParser\Components\OrderKeyword;
9
use PhpMyAdmin\SqlParser\Tests\TestCase;
10
11
class OrderKeywordTest extends TestCase
12
{
13
    public function testBuildAll(): void
14
    {
15
        $this->assertEquals(
16
            OrderKeyword::buildAll(
17
                [
18
                    new OrderKeyword(new Expression('a'), 'ASC'),
19
                    new OrderKeyword(new Expression('b'), 'DESC'),
20
                ]
21
            ),
22
            'a ASC, b DESC'
23
        );
24
    }
25
}
26