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

namespace SqlParser\Tests\Components;

use SqlParser\Parser;
use SqlParser\Components\Expression;
use SqlParser\Components\OrderKeyword;

use 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'
        );
    }
}