CakeProducts/tests/TestCase/Controller/BaseControllerTest.php

33 lines
648 B
PHP

<?php
namespace CakeProducts\Test\TestCase\Controller;
use Cake\TestSuite\IntegrationTestTrait;
use Cake\TestSuite\TestCase;
class BaseControllerTest extends TestCase
{
use IntegrationTestTrait;
protected function setUp(): void
{
parent::setUp(); // TODO: Change the autogenerated stub
$this->loadPlugins(['CakeProducts']);
}
public function loginUserByRole(string $role = 'admin'): void
{
$this->session(['Auth.User.id' => 1]);
$this->session(['Auth.id' => 1]);
}
/**
* @return void
*/
public function testTest()
{
$this->assertEquals(1, 1);
}
}