-
-
Notifications
You must be signed in to change notification settings - Fork 113
Expand file tree
/
Copy pathOrderKeywordTest.php
More file actions
27 lines (23 loc) · 745 Bytes
/
OrderKeywordTest.php
File metadata and controls
27 lines (23 loc) · 745 Bytes
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
27
<?php
declare(strict_types=1);
namespace PhpMyAdmin\SqlParser\Tests\Components;
use PhpMyAdmin\SqlParser\Components\Expression;
use PhpMyAdmin\SqlParser\Components\OrderKeyword;
use PhpMyAdmin\SqlParser\Components\OrderSortKeyword;
use PhpMyAdmin\SqlParser\Parsers\OrderKeywords;
use PhpMyAdmin\SqlParser\Tests\TestCase;
class OrderKeywordTest extends TestCase
{
public function testBuildAll(): void
{
$this->assertEquals(
'a ASC, b DESC',
OrderKeywords::buildAll(
[
new OrderKeyword(new Expression('a'), OrderSortKeyword::Asc),
new OrderKeyword(new Expression('b'), OrderSortKeyword::Desc),
],
),
);
}
}