As I said in the other pull request, these queries look like a lot of unnecessary work. There has to be an function that takes a style name and does this for you. If there is no such function, it should be added to phpBB (not just the testing framework). See https://github.com/phpbb/phpbb3/blob/develop/phpBB/includes/acp/acp_styles.php#L1101