diff --git a/tests/unit/framework/web/CacheSessionTest.php b/tests/unit/framework/web/CacheSessionTest.php new file mode 100644 index 0000000..c80fa1c --- /dev/null +++ b/tests/unit/framework/web/CacheSessionTest.php @@ -0,0 +1,28 @@ +mockApplication(); + Yii::$app->setComponent('cache', new FileCache()); + } + + public function testCreate() + { + $session = new CacheSession(); + + $session->writeSession('test', 'sessionData'); + $this->assertEquals('sessionData', $session->readSession('test')); + } +}