get(DataObject::class, 'fixed_fields'); $fixedFields['ClassName'] = 'DBClassNameVarchar'; Config::modify()->set(DataObject::class, 'fixed_fields', $fixedFields); } public function testVarcharType(): void { /** @var DataObject $obj */ $obj = HasFields::create(); $class = get_class($obj->dbObject('ClassName')); $this->assertSame(DBClassNameVarchar::class, $class); $this->assertTrue(is_a($class, DBVarchar::class, true)); } }