File: SubPartitionTest.php

package info (click to toggle)
phpmyadmin 4%3A5.2.1%2Bdfsg-1%2Bdeb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 131,332 kB
  • sloc: javascript: 212,681; php: 168,094; xml: 18,098; sql: 504; sh: 274; makefile: 205; python: 199
file content (39 lines) | stat: -rw-r--r-- 1,375 bytes parent folder | download
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
<?php

declare(strict_types=1);

namespace PhpMyAdmin\Tests\Partitioning;

use PhpMyAdmin\Partitioning\SubPartition;
use PHPUnit\Framework\TestCase;

/**
 * @covers \PhpMyAdmin\Partitioning\SubPartition
 */
class SubPartitionTest extends TestCase
{
    public function testSubPartition(): void
    {
        $row = [
            'TABLE_SCHEMA' => 'TABLE_SCHEMA',
            'TABLE_NAME' => 'TABLE_NAME',
            'SUBPARTITION_NAME' => 'subpartition_name',
            'SUBPARTITION_ORDINAL_POSITION' => 1,
            'SUBPARTITION_METHOD' => 'subpartition_method',
            'SUBPARTITION_EXPRESSION' => 'subpartition_expression',
            'TABLE_ROWS' => 2,
            'DATA_LENGTH' => 3,
            'INDEX_LENGTH' => 4,
            'PARTITION_COMMENT' => 'partition_comment',
        ];
        $object = new SubPartition($row);
        $this->assertEquals('subpartition_name', $object->getName());
        $this->assertEquals(1, $object->getOrdinal());
        $this->assertEquals('subpartition_method', $object->getMethod());
        $this->assertEquals('subpartition_expression', $object->getExpression());
        $this->assertEquals(2, $object->getRows());
        $this->assertEquals(3, $object->getDataLength());
        $this->assertEquals(4, $object->getIndexLength());
        $this->assertEquals('partition_comment', $object->getComment());
    }
}