<?php
declare(strict_types=1);
require_once __DIR__.'/../shared/lib/suggestions.php';
if(!suggestion_can_remove(['id'=>2,'role'=>'student'],2))throw new RuntimeException('Owner cannot remove');
if(suggestion_can_remove(['id'=>3,'role'=>'student'],2))throw new RuntimeException('Peer can remove');
if(suggestion_can_remove(['id'=>3,'role'=>'hod'],2))throw new RuntimeException('HOD gained unrequested moderation access');
if(!suggestion_can_remove(['id'=>3,'role'=>'admin'],2))throw new RuntimeException('Admin cannot moderate');
if(count(suggestion_categories())!==5)throw new RuntimeException('Categories mismatch');
echo "PASS: owner/admin removal rules and supported categories.\n";
