| 12
 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
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 
 | <?php
declare(strict_types=1);
namespace PhpMyAdmin\Tests\Properties\Options\Items;
use PhpMyAdmin\Properties\Options\Items\BoolPropertyItem;
use PhpMyAdmin\Properties\Options\Items\DocPropertyItem;
use PhpMyAdmin\Properties\Options\Items\HiddenPropertyItem;
use PhpMyAdmin\Properties\Options\Items\MessageOnlyPropertyItem;
use PhpMyAdmin\Properties\Options\Items\RadioPropertyItem;
use PhpMyAdmin\Properties\Options\Items\SelectPropertyItem;
use PhpMyAdmin\Properties\Options\Items\TextPropertyItem;
use PhpMyAdmin\Tests\AbstractTestCase;
/**
 * @coversNothing
 */
#[\PHPUnit\Framework\Attributes\CoversNothing]
class PropertyItemsTest extends AbstractTestCase
{
    public function testBoolText(): void
    {
        $object = new BoolPropertyItem(null, 'Text');
        self::assertSame('Text', $object->getText());
        $object->setText('xtext2');
        self::assertSame('xtext2', $object->getText());
    }
    public function testBoolName(): void
    {
        $object = new BoolPropertyItem('xname');
        self::assertSame('xname', $object->getName());
        $object->setName('xname2');
        self::assertSame('xname2', $object->getName());
    }
    public function testBoolGetItemType(): void
    {
        $object = new BoolPropertyItem();
        self::assertSame('bool', $object->getItemType());
    }
    public function testGetItemTypeDoc(): void
    {
        $object = new DocPropertyItem();
        self::assertSame('doc', $object->getItemType());
    }
    public function testGetItemTypeHidden(): void
    {
        $object = new HiddenPropertyItem();
        self::assertSame('hidden', $object->getItemType());
    }
    public function testGetItemTypeMessageOnly(): void
    {
        $object = new MessageOnlyPropertyItem();
        self::assertSame('messageOnly', $object->getItemType());
    }
    public function testGetItemTypeRadio(): void
    {
        $object = new RadioPropertyItem();
        self::assertSame('radio', $object->getItemType());
    }
    public function testGetItemTypeSelect(): void
    {
        $object = new SelectPropertyItem();
        self::assertSame('select', $object->getItemType());
    }
    public function testGetItemTypeText(): void
    {
        $object = new TextPropertyItem();
        self::assertSame('text', $object->getItemType());
    }
}
 |