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

FakeGlobalStateProvider   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Test Coverage

Coverage 60%

Importance

Changes 0
Metric Value
wmc 5
eloc 16
dl 0
loc 31
ccs 6
cts 10
cp 0.6
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getServerSuperGlobal() 0 3 1
A getSessionSuperGlobal() 0 3 1
A getCookieSuperGlobal() 0 3 1
A getGetSuperGlobal() 0 3 1
A getPostSuperGlobal() 0 3 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
}