mzur / kirby-defuse-session

Allows you to to write tests for code that uses the Kirby 3 session

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Kirby Defuse Session

Build Status

Allows you to to write tests for code that uses the Kirby 3 session.

Usage

use Kirby\Cms\App;
use Mzur\Kirby\DefuseSession\Defuse;

public function testSession()
{
    Defuse::defuse();
    $session = App::instance()->session();
    $session->set('testKey', 'testValue');
    $this->assertEquals('testValue', $session->get('testKey'));
}

Installation

composer require --dev mzur/kirby-defuse-session:@beta

Contributing

Feel free to send a pull request!

Issues/Bugs

Please use the GitHub issue tracker.

About

Allows you to to write tests for code that uses the Kirby 3 session

License:MIT License


Languages

Language:PHP 100.0%