public function testEnum2() { $m = new Model(); $m->addField('foo', ['enum' => [1, 'bar']]); $m['foo'] = 1; $this->assertSame(1, $m['foo']); $m['foo'] = 'bar'; $this->assertSame('bar', $m['foo']); }