xref: /webtrees/tests/MockGlobalFunctions.php (revision 74d6dc0ec259c643834b111577684e38e74234c8)
1*74d6dc0eSGreg Roach<?php
2*74d6dc0eSGreg Roach/**
3*74d6dc0eSGreg Roach * webtrees: online genealogy
4*74d6dc0eSGreg Roach * Copyright (C) 2019 webtrees development team
5*74d6dc0eSGreg Roach * This program is free software: you can redistribute it and/or modify
6*74d6dc0eSGreg Roach * it under the terms of the GNU General Public License as published by
7*74d6dc0eSGreg Roach * the Free Software Foundation, either version 3 of the License, or
8*74d6dc0eSGreg Roach * (at your option) any later version.
9*74d6dc0eSGreg Roach * This program is distributed in the hope that it will be useful,
10*74d6dc0eSGreg Roach * but WITHOUT ANY WARRANTY; without even the implied warranty of
11*74d6dc0eSGreg Roach * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12*74d6dc0eSGreg Roach * GNU General Public License for more details.
13*74d6dc0eSGreg Roach * You should have received a copy of the GNU General Public License
14*74d6dc0eSGreg Roach * along with this program. If not, see <http://www.gnu.org/licenses/>.
15*74d6dc0eSGreg Roach */
16*74d6dc0eSGreg Roachdeclare(strict_types=1);
17*74d6dc0eSGreg Roach
18*74d6dc0eSGreg Roachnamespace Fisharebest\Webtrees;
19*74d6dc0eSGreg Roach
20*74d6dc0eSGreg Roach/**
21*74d6dc0eSGreg Roach * Class MockGlobalFunctions
22*74d6dc0eSGreg Roach */
23*74d6dc0eSGreg Roachabstract class MockGlobalFunctions
24*74d6dc0eSGreg Roach{
25*74d6dc0eSGreg Roach    /**
26*74d6dc0eSGreg Roach     * Mock version of microtime()
27*74d6dc0eSGreg Roach     *
28*74d6dc0eSGreg Roach     * @param bool $get_as_float
29*74d6dc0eSGreg Roach     *
30*74d6dc0eSGreg Roach     * @return float|int[]
31*74d6dc0eSGreg Roach     */
32*74d6dc0eSGreg Roach    abstract public function microtime(bool $get_as_float);
33*74d6dc0eSGreg Roach
34*74d6dc0eSGreg Roach    /**
35*74d6dc0eSGreg Roach     * Mock version of ini_get()
36*74d6dc0eSGreg Roach     *
37*74d6dc0eSGreg Roach     * @param string $varname
38*74d6dc0eSGreg Roach     *
39*74d6dc0eSGreg Roach     * @return string
40*74d6dc0eSGreg Roach     */
41*74d6dc0eSGreg Roach    abstract public function iniGet(string $varname): string;
42*74d6dc0eSGreg Roach}
43