<commit_before>--TEST--
test for proper memory management of $user->get_person/set_person
--SKIPIF--
<?php if (!extension_loaded("midgard2")) print "skip"; ?>
--INI--
midgard.engine = On
midgard.http = On
midgard.memory_debug = Off
midgard.configuration=
midgard.configuration_file=[[CFG_FILE]]
report_memleaks = On
--FILE--
<?php
$person = new midgard_person();
$person->create();

$user = new midgard_user();

$user->login = 'hi';
$user->authtype = 'Plaintext';
$user->active = true;
$user->usertype = 1;
$user->set_person($person);
unset($person);

var_dump($user->create());
<commit_msg>do not set usertype. it is irrelevant in this test<commit_after>--TEST--
test for proper memory management of $user->get_person/set_person
--SKIPIF--
<?php if (!extension_loaded("midgard2")) print "skip"; ?>
--INI--
midgard.engine = On
midgard.http = On
midgard.memory_debug = Off
midgard.configuration=
midgard.configuration_file=[[CFG_FILE]]
report_memleaks = On
--FILE--
<?php
$person = new midgard_person();
$person->create();

$user = new midgard_user();

$user->login = 'hi';
$user->authtype = 'Plaintext';
$user->active = true;
$user->set_person($person);
unset($person);

var_dump($user->create());

{'fraction_non_alphanumeric': 0.18530884808013356, 'fraction_numerical': 0.0025041736227045075, 'mean_word_length': 5.481081081081081, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 20, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7054984', 'n_tokens_mistral': 438, 'n_tokens_neox': 418, 'n_words': 97}