CoreFiles by mySites.guru
MockHttpDriver.php44 lines, 803 bytes, from Joomla_4.1.3-rc1-Release_Candidate-Full_Package.zip
Raw History Compare with 4.1.1-rc2
md5
107214c8ff7d472487688f9ea3e37a47
sha1
36afe0d48652ad0ea3e25c33f13f8f5d49cc5bbb
sha256
eebda335bba0ddca89796540f265958c54d517ce460acc24fc8e34e006fdb56b
<?php

namespace DebugBar\Tests;

use DebugBar\HttpDriverInterface;

class MockHttpDriver implements HttpDriverInterface
{
    public $headers = array();

    public $sessionStarted = true;

    public $session = array();

    function setHeaders(array $headers)
    {
        $this->headers = array_merge($this->headers, $headers);
    }

    function isSessionStarted()
    {
        return $this->sessionStarted;
    }

    function setSessionValue($name, $value)
    {
        $this->session[$name] = $value;
    }

    function hasSessionValue($name)
    {
        return array_key_exists($name, $this->session);
    }

    function getSessionValue($name)
    {
        return $this->session[$name];
    }

    function deleteSessionValue($name)
    {
        unset($this->session[$name]);
    }
}

The same content is in 3 releases, Joomla 4.1.3-rc1 to 4.1.4-rc1. See them all, or every version of this file.