26 lines
		
	
	
		
			487 B
		
	
	
	
		
			PHP
		
	
	
	
			
		
		
	
	
			26 lines
		
	
	
		
			487 B
		
	
	
	
		
			PHP
		
	
	
	
<?php
 | 
						|
 | 
						|
namespace CakeProducts\Test\TestCase\Controller;
 | 
						|
 | 
						|
use Cake\TestSuite\IntegrationTestTrait;
 | 
						|
use Cake\TestSuite\TestCase;
 | 
						|
 | 
						|
class BaseControllerTest extends TestCase
 | 
						|
{
 | 
						|
    use IntegrationTestTrait;
 | 
						|
 | 
						|
    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);
 | 
						|
    }
 | 
						|
}
 |