Add production provider deps/config so transactional email and CMS media can use Resend and a dedicated r2 disk with custom-domain URLs. Co-authored-by: Cursor <cursoragent@cursor.com>
38 lines
1.0 KiB
PHP
38 lines
1.0 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Tests\Unit;
|
|
|
|
use App\Support\PublicImageUploadRules;
|
|
use Tests\TestCase;
|
|
|
|
class PublicImageUploadRulesDiskTest extends TestCase
|
|
{
|
|
public function test_uses_r2_disk_when_default_filesystem_is_r2(): void
|
|
{
|
|
config(['filesystems.default' => 'r2']);
|
|
|
|
$this->assertSame('r2', PublicImageUploadRules::disk());
|
|
}
|
|
|
|
public function test_uses_s3_disk_when_default_filesystem_is_s3(): void
|
|
{
|
|
config(['filesystems.default' => 's3']);
|
|
|
|
$this->assertSame('s3', PublicImageUploadRules::disk());
|
|
}
|
|
|
|
public function test_uses_public_disk_for_local_or_unset_default(): void
|
|
{
|
|
config(['filesystems.default' => 'local']);
|
|
$this->assertSame('public', PublicImageUploadRules::disk());
|
|
|
|
config(['filesystems.default' => 'public']);
|
|
$this->assertSame('public', PublicImageUploadRules::disk());
|
|
|
|
config(['filesystems.default' => null]);
|
|
$this->assertSame('public', PublicImageUploadRules::disk());
|
|
}
|
|
}
|