xref: /webtrees/tests/MockGlobalFunctions.php (revision 3cfcc809af53e831fa6cafac7b274a2cb407db6e)
174d6dc0eSGreg Roach<?php
2*3cfcc809SGreg Roach
374d6dc0eSGreg Roach/**
474d6dc0eSGreg Roach * webtrees: online genealogy
574d6dc0eSGreg Roach * Copyright (C) 2019 webtrees development team
674d6dc0eSGreg Roach * This program is free software: you can redistribute it and/or modify
774d6dc0eSGreg Roach * it under the terms of the GNU General Public License as published by
874d6dc0eSGreg Roach * the Free Software Foundation, either version 3 of the License, or
974d6dc0eSGreg Roach * (at your option) any later version.
1074d6dc0eSGreg Roach * This program is distributed in the hope that it will be useful,
1174d6dc0eSGreg Roach * but WITHOUT ANY WARRANTY; without even the implied warranty of
1274d6dc0eSGreg Roach * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1374d6dc0eSGreg Roach * GNU General Public License for more details.
1474d6dc0eSGreg Roach * You should have received a copy of the GNU General Public License
1574d6dc0eSGreg Roach * along with this program. If not, see <http://www.gnu.org/licenses/>.
1674d6dc0eSGreg Roach */
1774d6dc0eSGreg Roachdeclare(strict_types=1);
1874d6dc0eSGreg Roach
1974d6dc0eSGreg Roachnamespace Fisharebest\Webtrees;
2074d6dc0eSGreg Roach
2174d6dc0eSGreg Roach/**
2274d6dc0eSGreg Roach * Class MockGlobalFunctions
2374d6dc0eSGreg Roach */
2474d6dc0eSGreg Roachabstract class MockGlobalFunctions
2574d6dc0eSGreg Roach{
2674d6dc0eSGreg Roach    /**
2774d6dc0eSGreg Roach     * Mock version of microtime()
2874d6dc0eSGreg Roach     *
2974d6dc0eSGreg Roach     * @param bool $get_as_float
3074d6dc0eSGreg Roach     *
3174d6dc0eSGreg Roach     * @return float|int[]
3274d6dc0eSGreg Roach     */
3374d6dc0eSGreg Roach    abstract public function microtime(bool $get_as_float);
3474d6dc0eSGreg Roach
3574d6dc0eSGreg Roach    /**
3674d6dc0eSGreg Roach     * Mock version of ini_get()
3774d6dc0eSGreg Roach     *
3874d6dc0eSGreg Roach     * @param string $varname
3974d6dc0eSGreg Roach     *
4074d6dc0eSGreg Roach     * @return string
4174d6dc0eSGreg Roach     */
4274d6dc0eSGreg Roach    abstract public function iniGet(string $varname): string;
4374d6dc0eSGreg Roach}
44