<?php

namespace PHPSQLParser\Test\Parser;
use PHPSQLParser\PHPSQLParser;
use PHPSQLParser\PHPSQLCreator;

class issue67Test extends \PHPUnit\Framework\TestCase {
	
    public function testIssue67() {


        $sql = "SET SESSION group_concat_max_len = @@max_allowed_packet";
        $parser = new PHPSQLParser($sql, true);
        $p = $parser->parsed;
        $expected = getExpectedValue(dirname(__FILE__), 'issue67a.serialized');
        $this->assertEquals($expected, $p, '@ character after operator should not fail.');

        $sql = "SET @a = 1";
        $parser = new PHPSQLParser($sql, true);
        $p = $parser->parsed;
        $expected = getExpectedValue(dirname(__FILE__), 'issue67b.serialized');
        $this->assertEquals($expected, $p, 'user defined variables should not fail');

    }
}

