[ticket/12432] Migrator should not revert custom functions

https://tracker.phpbb.com/browse/PHPBB3-12432

PHPBB3-12432
[ticket/12432] Adding unit test

PHPBB3-12432
[ticket/12432] Correcting the assertion

PHPBB3-12432
Merge remote-tracking branch 'remotes/Nicofuma/ticket/12432' into develop-ascraeus

# By Nicofuma
# Via Nicofuma
* remotes/Nicofuma/ticket/12432:
  [ticket/12432] Correcting the assertion
  [ticket/12432] Adding unit test
  [ticket/12432] Migrator should not revert custom functions