summaryrefslogtreecommitdiffstats
path: root/tests/Components/IntoKeywordTest.php
blob: ee30f0924356c4888670d95b7829567fea59f6b7 (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
<?php

namespace SqlParser\Tests\Components;

use SqlParser\Parser;
use SqlParser\Components\IntoKeyword;

use SqlParser\Tests\TestCase;

class IntoKeywordTest extends TestCase
{

    public function testParse()
    {
        $component = IntoKeyword::parse(new Parser(), $this->getTokensList('OUTFILE "/tmp/outfile.txt"'));
        $this->assertEquals($component->type, 'OUTFILE');
        $this->assertEquals($component->dest, '/tmp/outfile.txt');
    }

    public function testParseErr1()
    {
        $component = IntoKeyword::parse(new Parser(), $this->getTokensList('OUTFILE;'));
        $this->assertEquals($component->type, 'OUTFILE');
    }
}