Kirby Defuse Session
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.