This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\App\Config;
|
||||
|
||||
use CodeIgniter\Test\CIUnitTestCase;
|
||||
|
||||
final class SchoolYearRouteIntegrityTest extends CIUnitTestCase
|
||||
{
|
||||
public function testSchoolYearManagementRoutesAllowPrincipalRole(): void
|
||||
{
|
||||
$routes = file_get_contents(ROOTPATH . 'app/Config/Routes.php') ?: '';
|
||||
|
||||
$this->assertMatchesRegularExpression(
|
||||
"/\\\$routes->group\\('administrator\\/school-years', \\['filter' => 'auth:[^']*\\bprincipal\\b[^']*'\\]/",
|
||||
$routes
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user