/
jagepard
/
Rudra-Controller
Обзор
Документация
Войти
/
jagepard
/
Rudra-Controller
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
tests/ControllerTest.php
39 строк
1007 B
Jagepard
fix
05 июл 2026, 08:22
05 июл 2026, 08:22
ad26435
Код
Авторство
О чём код?
<?php declare(strict_types=1); /** * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. * * @author Korotkov Danila (Jagepard) <jagepard@yandex.ru> * @license https://mozilla.org/MPL/2.0/ MPL-2.0 */ namespace Rudra\Controller\Tests; use Rudra\Container\Facades\Session; use Rudra\Controller\Controller; use Rudra\Controller\ControllerInterface; class ControllerTest extends \PHPUnit\Framework\TestCase { protected ControllerInterface $controller; protected function setUp(): void { $this->controller = new Controller(); $this->controller->init(); $this->controller->before(); $this->controller->after(); } /** * @runInSeparateProcess */ public function testInit() { $this->assertTrue(Session::has("csrf_token")); $this->controller->csrfProtection(); } }