Exemplo n.º 1
0
 /**
  * Destroy Yii app singleton, DI container, session and cookies
  */
 protected function tearDown()
 {
     $_COOKIE = [];
     \Yii::$app->session->destroy();
     \Yii::$app = null;
     \Yii::$container = new Container();
     $this->urlManager = [];
     parent::tearDown();
 }
Exemplo n.º 2
0
        }
        echo '</pre>';
    }
    /**
     * Prints given object within pre tag and exit code execution.
     * @param mixed $object
     * @see p
     */
    public static function pie($object)
    {
        self::p($object);
        exit;
    }
    /**
     * Wrapper for standard [[BaseYii::t()]] translation function.
     * @param  string $message  Message to be translated.
     * @param  array  $params   The parameters that will be used to replace the corresponding placeholders in the
     *                          message.
     * @param  string $category The message category.
     * @return string The translated message.
     * @see t
     */
    public static function tr($message, $params = [], $category = 'app')
    {
        return self::t($category, $message, $params);
    }
}
spl_autoload_register(['Yii', 'autoload'], true, true);
//	Yii::$classMap = require( __DIR__ . '/classes.php' );
Yii::$container = new yii\di\Container();
Exemplo n.º 3
0
 /**
  * Destroys application in Yii::$app by setting it to null.
  */
 protected function destroyApplication()
 {
     Yii::$app = null;
     Yii::$container = new Container();
 }