diff options
Diffstat (limited to 'tests/Components/FunctionCallTest.php')
-rw-r--r-- | tests/Components/FunctionCallTest.php | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/Components/FunctionCallTest.php b/tests/Components/FunctionCallTest.php new file mode 100644 index 0000000..b7f71ca --- /dev/null +++ b/tests/Components/FunctionCallTest.php @@ -0,0 +1,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)); + } +} |