# quadmenu/3.3.6/vendor/franmastromarino/wp-orm/tests/Single/SingleEntityTest.php

QuadMenu – Mega Menu, version 3.3.6. 39 lines.

- Page: https://pluginprobe.com/plugins/quadmenu/3.3.6/code/vendor/franmastromarino/wp-orm/tests/Single/SingleEntityTest.php
- Raw: https://pluginprobe.com/plugins/quadmenu/3.3.6/raw/vendor/franmastromarino/wp-orm/tests/Single/SingleEntityTest.php
- Modified: 2025-11-15T21:00:52+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/quadmenu/3.3.6/code/vendor/franmastromarino/wp-orm/tests/Single/SingleEntityTest.php#L10-L20`.

```php
<?php

namespace QuadLayers\WP_Orm\Tests\Single;

class SingleEntityTest extends \QuadLayers\WP_Orm\Entity\SingleEntity
{
    public static $sanitizeProperties = [
        'key1' => 'strval',
        'key2' => 'strval',
        'key3' => self::class . '::sanitizeKey3',
        'key4' => 'self::sanitizeKey4',
        'key5' => '$this->sanitizeKey5',
    ];

    public string $key1 = 'default_value_1';
    public string $key2 = 'default_value_2';
    public string $key3 = '3';
    public int $key4 = 3;
    public string $key5 = 'Test Alternative';

    public static function sanitizeKey3($value)
    {
        if (is_numeric($value)) {
            return (string) $value;
        }
        return '0';
    }

    public static function sanitizeKey4($value)
    {
        return (int) $value;
    }

    public function sanitizeKey5($value = null)
    {
        return 'Test Alternative';
    }
}

```
