Location: PHPKode > scripts > PHP SQL Parser > PHP-SQL-Parser/testsuite/tests/creator/function.php
<?php

require_once(dirname(__FILE__) . '/../../../php-sql-parser.php');
require_once(dirname(__FILE__) . '/../../../php-sql-creator.php');
require_once(dirname(__FILE__) . '/../../test-more.php');


$sql = 'SELECT 	SUM( 10 ) as test FROM account';
$parser = new PHPSQLParser($sql);
$creator = new PHPSQLCreator($parser->parsed);
$created = $creator->created;
$expected = getExpectedValue(dirname(__FILE__), 'function.sql', false);
ok($created === $expected, 'a function');

Return current item: PHP SQL Parser