1
0
mirror of https://github.com/maximebf/php-debugbar.git synced 2025-01-17 21:38:14 +01:00
php-debugbar/tests/DebugBar/Tests/MockHttpDriver.php

45 lines
803 B
PHP
Raw Normal View History

<?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]);
}
2014-01-16 21:41:41 +00:00
}