public function testMandatory1() { $m = new Model(); $m->addField('foo', ['mandatory' => true]); $m['foo'] = 'abc'; $m['foo'] = null; unset($m['foo']); }