summaryrefslogtreecommitdiffstats
path: root/tests/Components/OrderKeywordTest.php
blob: bc07d0387b65a5e60d08d91f3f7c2027a2e24f7e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php

namespace PhpMyAdmin\SqlParser\Tests\Components;

use PhpMyAdmin\SqlParser\Components\Expression;
use PhpMyAdmin\SqlParser\Components\OrderKeyword;
use PhpMyAdmin\SqlParser\Tests\TestCase;

class OrderKeywordTest extends TestCase
{
    public function testBuild()
    {
        $this->assertEquals(
            OrderKeyword::build(
                array(
                    new OrderKeyword(new Expression('a'), 'ASC'),
                    new OrderKeyword(new Expression('b'), 'DESC')
                )
            ),
            'a ASC, b DESC'
        );
    }
}