Completed
Push — search ( 076ba7...2a5267 )
by Simon
16:36 queued 11:48
created

FakeGlobalStateProvider::getGetSuperGlobal()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php
2
/******************************************************************************
3
 * Wikipedia Account Creation Assistance tool                                 *
4
 *                                                                            *
5
 * All code in this file is released into the public domain by the ACC        *
6
 * Development Team. Please see team.json for a list of contributors.         *
7
 ******************************************************************************/
8
9
namespace Waca\Providers\GlobalState;
10
11
/**
12
 * Class TestStateProvider
13
 *
14
 * This class is only to be used for testing sets of the global state variables. For everything else, please use PHPUnit
15
 * mocks as normal.
16
 *
17
 * @package Waca\Tests\Utility
18
 */
19
class FakeGlobalStateProvider extends GlobalStateProvider implements IGlobalStateProvider
20
{
21
    var $server = array();
22
    var $get = array();
23
    var $post = array();
24
    var $session = array();
25
    var $cookie = array();
26
27 2
    public function &getServerSuperGlobal()
28
    {
29 2
        return $this->server;
30
    }
31
32 6
    public function &getGetSuperGlobal()
33
    {
34 6
        return $this->get;
35
    }
36
37
    public function &getPostSuperGlobal()
38
    {
39
        return $this->post;
40
    }
41
42 5
    public function &getSessionSuperGlobal()
43
    {
44 5
        return $this->session;
45
    }
46
47
    public function &getCookieSuperGlobal()
48
    {
49
        return $this->cookie;
50
    }
51
}