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

namespace SqlParser\Tests\Components;

use SqlParser\Components\ArrayObj;
use SqlParser\Components\FunctionCall;

use SqlParser\Tests\TestCase;

class FunctionCallTest extends TestCase
{

    public function testBuildArray()
    {
        $component = new FunctionCall('func', array('a', 'b'));
        $this->assertEquals('func(a, b)', FunctionCall::build($component));
    }

    public function testBuildArrayObj()
    {
        $component = new FunctionCall('func', new ArrayObj(array('a', 'b')));
        $this->assertEquals('func(a, b)', FunctionCall::build($component));
    }
}