Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
9 / 9
100.00% covered (success)
100.00%
3 / 3
CRAP
100.00% covered (success)
100.00%
1 / 1
phpbb_dbal_migration_recall_params
100.00% covered (success)
100.00%
9 / 9
100.00% covered (success)
100.00%
3 / 3
4
100.00% covered (success)
100.00%
1 / 1
 update_schema
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 update_data
100.00% covered (success)
100.00%
3 / 3
100.00% covered (success)
100.00%
1 / 1
1
 test_call
100.00% covered (success)
100.00%
5 / 5
100.00% covered (success)
100.00%
1 / 1
2
1<?php
2/**
3*
4* This file is part of the phpBB Forum Software package.
5*
6* @copyright (c) phpBB Limited <https://www.phpbb.com>
7* @license GNU General Public License, version 2 (GPL-2.0)
8*
9* For full copyright and license information, please see
10* the docs/CREDITS.txt file.
11*
12*/
13
14class phpbb_dbal_migration_recall_params extends \phpbb\db\migration\migration
15{
16    function update_schema()
17    {
18        return array();
19    }
20
21    function update_data()
22    {
23        return array(
24            array('custom', array(array($this, 'test_call'), array(5))),
25        );
26    }
27
28    // This function should be called 5 times
29    function test_call($times, $input)
30    {
31        global $migrator_test_call_input;
32
33        $migrator_test_call_input = (int) $input;
34
35        if ($migrator_test_call_input < $times)
36        {
37            return ($migrator_test_call_input + 1);
38        }
39
40        return;
41    }
42}