MainAero/yii2-gtm-widget

View on GitHub
tests/stubs/ApplicationStub.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php
namespace mainaero\yii\gtm\stubs;

use yii\web\Application;

class ApplicationStub extends Application
{
    public $session;

    public function get($id, $throwException = true)
    {
      if ($id == 'session')
        return $this->session ?? $this->session = new SessionStub();
      return parent::get($id, $throwException);
    }
}