Passed
Pull Request — master (#311)
by William
12:43
created

OrderKeywordTest::testBuild()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

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