2018-11-14 02:17:27 +01:00
|
|
|
<?php
|
|
|
|
|
2023-02-03 20:41:59 +01:00
|
|
|
declare(strict_types=1);
|
|
|
|
|
2018-11-14 02:17:27 +01:00
|
|
|
namespace Engelsystem\Test\Unit\Controllers;
|
|
|
|
|
|
|
|
use Engelsystem\Test\Unit\Controllers\Stub\ControllerImplementation;
|
|
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
|
|
|
|
class BaseControllerTest extends TestCase
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @covers \Engelsystem\Controllers\BaseController::getPermissions
|
|
|
|
*/
|
2022-12-14 19:15:20 +01:00
|
|
|
public function testGetPermissions(): void
|
2018-11-14 02:17:27 +01:00
|
|
|
{
|
|
|
|
$controller = new ControllerImplementation();
|
|
|
|
|
|
|
|
$this->assertEquals([
|
|
|
|
'foo',
|
|
|
|
'lorem' => [
|
|
|
|
'ipsum',
|
|
|
|
'dolor',
|
|
|
|
],
|
|
|
|
], $controller->getPermissions());
|
2019-07-09 21:43:18 +02:00
|
|
|
|
|
|
|
$this->assertTrue(method_exists($controller, 'setValidator'));
|
2018-11-14 02:17:27 +01:00
|
|
|
}
|
|
|
|
}
|