blob: 7e0948b1a2db35e5cc128e98c6fcb459d7e27e8f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
<?php
namespace PhpMyAdmin\SqlParser\Tests\Components;
use PhpMyAdmin\SqlParser\Parser;
use PhpMyAdmin\SqlParser\Components\PartitionDefinition;
use PhpMyAdmin\SqlParser\Tests\TestCase;
class PartitionDefinitionTest extends TestCase
{
public function testParse()
{
$component = PartitionDefinition::parse(
new Parser(),
$this->getTokensList('PARTITION p0 VALUES LESS THAN(1990)')
);
$this->assertFalse($component->isSubpartition);
$this->assertEquals('p0', $component->name);
$this->assertEquals('LESS THAN', $component->type);
$this->assertEquals('(1990)', $component->expr->expr);
}
}
|