summaryrefslogtreecommitdiffstats
path: root/tests/Fragments/OptionsFragmentTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Fragments/OptionsFragmentTest.php')
-rw-r--r--tests/Fragments/OptionsFragmentTest.php65
1 files changed, 0 insertions, 65 deletions
diff --git a/tests/Fragments/OptionsFragmentTest.php b/tests/Fragments/OptionsFragmentTest.php
deleted file mode 100644
index 8fe596d..0000000
--- a/tests/Fragments/OptionsFragmentTest.php
+++ /dev/null
@@ -1,65 +0,0 @@
-<?php
-
-namespace SqlParser\Tests\Fragments;
-
-use SqlParser\Parser;
-use SqlParser\Fragments\OptionsFragment;
-
-use SqlParser\Tests\TestCase;
-
-class OptionsFragmentTest extends TestCase
-{
-
- public function testParse()
- {
- $fragment = OptionsFragment::parse(
- new Parser(),
- $this->getTokensList('A B = (test) C'),
- array(
- 'A' => 1,
- 'B' => array(2, 'var'),
- 'C' => 3,
- )
- );
- $this->assertEquals(
- array(
- 1 => 'A',
- 2 => array(
- 'name' => 'B',
- 'value' => 'test',
- 'value_' => 'test',
- 'equal' => false,
- ),
- 3 => 'C',
- ),
- $fragment->options
- );
- }
-
- public function testMerge()
- {
- $fragment = new OptionsFragment(array('a'));
- $fragment->merge(array('b', 'c'));
- $this->assertEquals($fragment->options, array('a', 'b', 'c'));
- }
-
- public function testBuild()
- {
- $fragment = new OptionsFragment(
- array(
- 'ALL',
- 'SQL_CALC_FOUND_ROWS',
- array(
- 'name' => 'MAX_STATEMENT_TIME',
- 'value' => '42',
- 'value_' => '42',
- 'equal' => true,
- ),
- )
- );
- $this->assertEquals(
- OptionsFragment::build($fragment),
- 'ALL SQL_CALC_FOUND_ROWS MAX_STATEMENT_TIME=42'
- );
- }
-}