blob: 13be866035415ac41ccf927ff4595c931446c91f (
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
<?php
namespace SqlParser\Tests\Components;
use SqlParser\Components\ArrayObj;
use SqlParser\Tests\TestCase;
class ArrayObjTest extends TestCase
{
public function testBuildRaw()
{
$component = new ArrayObj(array('a', 'b'), array());
$this->assertEquals('(a, b)', ArrayObj::build($component));
}
public function testBuildValues()
{
$component = new ArrayObj(array(), array('a', 'b'));
$this->assertEquals('(a, b)', ArrayObj::build($component));
}
/**
* @dataProvider testParseProvider
*/
public function testParse($test)
{
$this->runParserTest($test);
}
public function testParseProvider()
{
return array(
array('parser/parseArrayErr1'),
array('parser/parseArrayErr2'),
array('parser/parseArrayErr3'),
);
}
}
|