atk4\data\tests\FieldTest::testEnum4 PHP Method

testEnum4() public method

public testEnum4 ( )
    public function testEnum4()
    {
        // PHP type control is really crappy...
        // This test has no purpose but it stands testament
        // to a weird behaviours of PHP
        $m = new Model();
        $m->addField('foo', ['enum' => [1, 'bar'], 'default' => 1]);
        $m['foo'] = null;
        $this->assertSame(null, $m['foo']);
    }