3
0
mirror of https://github.com/snipe/snipe-it.git synced 2026-04-11 02:08:48 +00:00
Files
snipe-it/tests/Unit/Presenters/ConsumablePresenterTest.php

22 lines
511 B
PHP

<?php
namespace Tests\Unit\Presenters;
use App\Models\Consumable;
use Tests\TestCase;
class ConsumablePresenterTest extends TestCase
{
public function test_dynamic_url()
{
$this->settings->set(['locale' => 'en-US']);
$consumable = Consumable::factory()->create(['model_number' => 'MN-123']);
$this->assertEquals(
'https://example.com/en-US/MN-123',
$consumable->present()->dynamicUrl('https://example.com/{LOCALE}/{MODEL_NUMBER}')
);
}
}