26 lines
764 B
PHP
26 lines
764 B
PHP
<?php
|
|
|
|
namespace Tests\Unit;
|
|
|
|
use App\Http\Controllers\Api\Tenant\EventJoinTokenLayoutController;
|
|
use ReflectionClass;
|
|
use Tests\TestCase;
|
|
|
|
class EventJoinTokenLayoutControllerPresetsTest extends TestCase
|
|
{
|
|
public function test_background_preset_assets_exist(): void
|
|
{
|
|
$reflection = new ReflectionClass(EventJoinTokenLayoutController::class);
|
|
$presets = $reflection->getConstant('BACKGROUND_PRESETS');
|
|
|
|
$this->assertIsArray($presets);
|
|
$this->assertNotEmpty($presets);
|
|
|
|
foreach ($presets as $key => $path) {
|
|
$this->assertIsString($path);
|
|
$this->assertNotSame('', $path);
|
|
$this->assertFileExists(public_path($path), "Missing background asset for preset {$key}.");
|
|
}
|
|
}
|
|
}
|