$this->
getContainer() ->
get(DefinitionInstanceRegistry::
class) ->
register($definition);
$treeUpdater =
new TreeUpdater( $this->
getContainer()->
get(DefinitionInstanceRegistry::
class),
$this->
getContainer()->
get(Connection::
class) );
$context = Context::
createDefaultContext();
$treeUpdater->
batchUpdate($ids->
getList(['r', 'a', 'b', 'aa', 'ab'
]), 'test_tree',
$context);
$r =
$this->
fetch($ids->
getBytes('r'
), 'test_tree'
);
static::
assertSame('1',
$r['test_level'
]);
static::
assertNull($r['test_path'
]);
$a =
$this->
fetch($ids->
getBytes('a'
), 'test_tree'
);
static::
assertSame('2',
$a['test_level'
]);
static::
assertSame('|' .
$ids->
get('r'
) . '|',
$a['test_path'
]);
$b =
$this->
fetch($ids->
getBytes('b'
), 'test_tree'
);
static::
assertSame('2',
$b['test_level'
]);